<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span id="local-6989586621680823258"><span id="local-6989586621680823259"><span id="local-6989586621680823260"><span id="local-6989586621680823261"><span id="local-6989586621680823262"><span id="local-6989586621680823263"><span id="local-6989586621680823264"><span id="local-6989586621680823265"><span id="local-6989586621680823266"><span id="local-6989586621680823267"><span id="local-6989586621680823268"><span id="local-6989586621680823269"><span id="local-6989586621680823270"><span id="local-6989586621680823271"></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span class="hs-comment">{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1998

\section[DataCon]{@DataCon@: Data Constructors}
-}</span><span>
</span><span id="line-7"></span><span>
</span><span id="line-8"></span><span class="hs-pragma">{-# LANGUAGE CPP, DeriveDataTypeable #-}</span><span>
</span><span id="line-9"></span><span>
</span><span id="line-10"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Core.DataCon</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-11"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Main data types</span></span><span>
</span><span id="line-12"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier">DataCon</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataConRep"><span class="hs-identifier">DataConRep</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-13"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#SrcStrictness"><span class="hs-identifier">SrcStrictness</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#SrcUnpackedness"><span class="hs-identifier">SrcUnpackedness</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-14"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#HsSrcBang"><span class="hs-identifier">HsSrcBang</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#HsImplBang"><span class="hs-identifier">HsImplBang</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-15"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#StrictnessMark"><span class="hs-identifier">StrictnessMark</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-16"></span><span>        </span><span class="annot"><a href="GHC.Types.Basic.html#ConTag"><span class="hs-identifier">ConTag</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-17"></span><span>
</span><span id="line-18"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Equality specs</span></span><span>
</span><span id="line-19"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#EqSpec"><span class="hs-identifier">EqSpec</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#mkEqSpec"><span class="hs-identifier">mkEqSpec</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#eqSpecTyVar"><span class="hs-identifier">eqSpecTyVar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#eqSpecType"><span class="hs-identifier">eqSpecType</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-20"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#eqSpecPair"><span class="hs-identifier">eqSpecPair</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#eqSpecPreds"><span class="hs-identifier">eqSpecPreds</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-21"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#substEqSpec"><span class="hs-identifier">substEqSpec</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#filterEqSpec"><span class="hs-identifier">filterEqSpec</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-22"></span><span>
</span><span id="line-23"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Field labels</span></span><span>
</span><span id="line-24"></span><span>        </span><span class="annot"><a href="GHC.Types.FieldLabel.html#FieldLbl"><span class="hs-identifier">FieldLbl</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.FieldLabel.html#FieldLabel"><span class="hs-identifier">FieldLabel</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.FieldLabel.html#FieldLabelString"><span class="hs-identifier">FieldLabelString</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-25"></span><span>
</span><span id="line-26"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Type construction</span></span><span>
</span><span id="line-27"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#mkDataCon"><span class="hs-identifier">mkDataCon</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#fIRST_TAG"><span class="hs-identifier">fIRST_TAG</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-28"></span><span>
</span><span id="line-29"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Type deconstruction</span></span><span>
</span><span id="line-30"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConRepType"><span class="hs-identifier">dataConRepType</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConInstSig"><span class="hs-identifier">dataConInstSig</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConFullSig"><span class="hs-identifier">dataConFullSig</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-31"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConName"><span class="hs-identifier">dataConName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConIdentity"><span class="hs-identifier">dataConIdentity</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConTag"><span class="hs-identifier">dataConTag</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConTagZ"><span class="hs-identifier">dataConTagZ</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-32"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConTyCon"><span class="hs-identifier">dataConTyCon</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConOrigTyCon"><span class="hs-identifier">dataConOrigTyCon</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-33"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConWrapperType"><span class="hs-identifier">dataConWrapperType</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-34"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConNonlinearType"><span class="hs-identifier">dataConNonlinearType</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-35"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConDisplayType"><span class="hs-identifier">dataConDisplayType</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-36"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConUnivTyVars"><span class="hs-identifier">dataConUnivTyVars</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConExTyCoVars"><span class="hs-identifier">dataConExTyCoVars</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConUnivAndExTyCoVars"><span class="hs-identifier">dataConUnivAndExTyCoVars</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-37"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConUserTyVars"><span class="hs-identifier">dataConUserTyVars</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConUserTyVarBinders"><span class="hs-identifier">dataConUserTyVarBinders</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-38"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConEqSpec"><span class="hs-identifier">dataConEqSpec</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConTheta"><span class="hs-identifier">dataConTheta</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-39"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConStupidTheta"><span class="hs-identifier">dataConStupidTheta</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-40"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConOtherTheta"><span class="hs-identifier">dataConOtherTheta</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-41"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConInstArgTys"><span class="hs-identifier">dataConInstArgTys</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConOrigArgTys"><span class="hs-identifier">dataConOrigArgTys</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConOrigResTy"><span class="hs-identifier">dataConOrigResTy</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-42"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConInstOrigArgTys"><span class="hs-identifier">dataConInstOrigArgTys</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConRepArgTys"><span class="hs-identifier">dataConRepArgTys</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-43"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConFieldLabels"><span class="hs-identifier">dataConFieldLabels</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConFieldType"><span class="hs-identifier">dataConFieldType</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConFieldType_maybe"><span class="hs-identifier">dataConFieldType_maybe</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-44"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConSrcBangs"><span class="hs-identifier">dataConSrcBangs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-45"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConSourceArity"><span class="hs-identifier">dataConSourceArity</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConRepArity"><span class="hs-identifier">dataConRepArity</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-46"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConIsInfix"><span class="hs-identifier">dataConIsInfix</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-47"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConWorkId"><span class="hs-identifier">dataConWorkId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConWrapId"><span class="hs-identifier">dataConWrapId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConWrapId_maybe"><span class="hs-identifier">dataConWrapId_maybe</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-48"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConImplicitTyThings"><span class="hs-identifier">dataConImplicitTyThings</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-49"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConRepStrictness"><span class="hs-identifier">dataConRepStrictness</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConImplBangs"><span class="hs-identifier">dataConImplBangs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConBoxer"><span class="hs-identifier">dataConBoxer</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-50"></span><span>
</span><span id="line-51"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#splitDataProductType_maybe"><span class="hs-identifier">splitDataProductType_maybe</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-52"></span><span>
</span><span id="line-53"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Predicates on DataCons</span></span><span>
</span><span id="line-54"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#isNullarySrcDataCon"><span class="hs-identifier">isNullarySrcDataCon</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#isNullaryRepDataCon"><span class="hs-identifier">isNullaryRepDataCon</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#isTupleDataCon"><span class="hs-identifier">isTupleDataCon</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#isUnboxedTupleCon"><span class="hs-identifier">isUnboxedTupleCon</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-55"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#isUnboxedSumCon"><span class="hs-identifier">isUnboxedSumCon</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-56"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#isVanillaDataCon"><span class="hs-identifier">isVanillaDataCon</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#classDataCon"><span class="hs-identifier">classDataCon</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConCannotMatch"><span class="hs-identifier">dataConCannotMatch</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-57"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#dataConUserTyVarsArePermuted"><span class="hs-identifier">dataConUserTyVarsArePermuted</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-58"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#isBanged"><span class="hs-identifier">isBanged</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#isMarkedStrict"><span class="hs-identifier">isMarkedStrict</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#eqHsBang"><span class="hs-identifier">eqHsBang</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#isSrcStrict"><span class="hs-identifier">isSrcStrict</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#isSrcUnpacked"><span class="hs-identifier">isSrcUnpacked</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-59"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#specialPromotedDc"><span class="hs-identifier">specialPromotedDc</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-60"></span><span>
</span><span id="line-61"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Promotion related functions</span></span><span>
</span><span id="line-62"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#promoteDataCon"><span class="hs-identifier">promoteDataCon</span></a></span><span>
</span><span id="line-63"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span class="hs-cpp">

#include &quot;HsVersions.h&quot;
</span><span>
</span><span id="line-67"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-68"></span><span>
</span><span id="line-69"></span><span class="hs-keyword">import</span><span> </span><span class="hs-pragma">{-# SOURCE</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html"><span class="hs-identifier">GHC.Types.Id.Make</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#DataConBoxer"><span class="hs-identifier">DataConBoxer</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-70"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Type.html"><span class="hs-identifier">GHC.Core.Type</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Type</span></span><span>
</span><span id="line-71"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Coercion.html"><span class="hs-identifier">GHC.Core.Coercion</span></a></span><span>
</span><span id="line-72"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Unify.html"><span class="hs-identifier">GHC.Core.Unify</span></a></span><span>
</span><span id="line-73"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html"><span class="hs-identifier">GHC.Core.TyCon</span></a></span><span>
</span><span id="line-74"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Multiplicity.html"><span class="hs-identifier">GHC.Core.Multiplicity</span></a></span><span>
</span><span id="line-75"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.FieldLabel.html"><span class="hs-identifier">GHC.Types.FieldLabel</span></a></span><span>
</span><span id="line-76"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Class.html"><span class="hs-identifier">GHC.Core.Class</span></a></span><span>
</span><span id="line-77"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.html"><span class="hs-identifier">GHC.Types.Name</span></a></span><span>
</span><span id="line-78"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Builtin.Names.html"><span class="hs-identifier">GHC.Builtin.Names</span></a></span><span>
</span><span id="line-79"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Predicate.html"><span class="hs-identifier">GHC.Core.Predicate</span></a></span><span>
</span><span id="line-80"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Var.html"><span class="hs-identifier">GHC.Types.Var</span></a></span><span>
</span><span id="line-81"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-82"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span>
</span><span id="line-83"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html"><span class="hs-identifier">GHC.Types.Basic</span></a></span><span>
</span><span id="line-84"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html"><span class="hs-identifier">GHC.Data.FastString</span></a></span><span>
</span><span id="line-85"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Unit.html"><span class="hs-identifier">GHC.Unit</span></a></span><span>
</span><span id="line-86"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Binary.html"><span class="hs-identifier">GHC.Utils.Binary</span></a></span><span>
</span><span id="line-87"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Set.html"><span class="hs-identifier">GHC.Types.Unique.Set</span></a></span><span>
</span><span id="line-88"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html"><span class="hs-identifier">GHC.Types.Unique</span></a></span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#mkAlphaTyVarUnique"><span class="hs-identifier">mkAlphaTyVarUnique</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-89"></span><span>
</span><span id="line-90"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html"><span class="hs-identifier">GHC.Driver.Session</span></a></span><span>
</span><span id="line-91"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.LanguageExtensions.html#"><span class="hs-identifier">GHC.LanguageExtensions</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">LangExt</span></span><span>
</span><span id="line-92"></span><span>
</span><span id="line-93"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.html#"><span class="hs-identifier">Data.ByteString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Internal.html#ByteString"><span class="hs-identifier">ByteString</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-94"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Builder.html#"><span class="hs-identifier">Data.ByteString.Builder</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">BSB</span></span><span>
</span><span id="line-95"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.html#"><span class="hs-identifier">Data.ByteString.Lazy</span></a></span><span>    </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">LBS</span></span><span>
</span><span id="line-96"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../base/src/Data.Data.html#"><span class="hs-identifier">Data.Data</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Data</span></span><span>
</span><span id="line-97"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Char.html#"><span class="hs-identifier">Data.Char</span></a></span><span>
</span><span id="line-98"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.List.html#"><span class="hs-identifier">Data.List</span></a></span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/Data.Foldable.html#find"><span class="hs-identifier">find</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-99"></span><span>
</span><span id="line-100"></span><span class="hs-comment">{-
Data constructor representation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Consider the following Haskell data type declaration

        data T = T !Int ![Int]

Using the strictness annotations, GHC will represent this as

        data T = T Int# [Int]

That is, the Int has been unboxed.  Furthermore, the Haskell source construction

        T e1 e2

is translated to

        case e1 of { I# x -&gt;
        case e2 of { r -&gt;
        T x r }}

That is, the first argument is unboxed, and the second is evaluated.  Finally,
pattern matching is translated too:

        case e of { T a b -&gt; ... }

becomes

        case e of { T a' b -&gt; let a = I# a' in ... }

To keep ourselves sane, we name the different versions of the data constructor
differently, as follows.


Note [Data Constructor Naming]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Each data constructor C has two, and possibly up to four, Names associated with it:

                   OccName   Name space   Name of   Notes
 ---------------------------------------------------------------------------
 The &quot;data con itself&quot;   C     DataName   DataCon   In dom( GlobalRdrEnv )
 The &quot;worker data con&quot;   C     VarName    Id        The worker
 The &quot;wrapper data con&quot;  $WC   VarName    Id        The wrapper
 The &quot;newtype coercion&quot;  :CoT  TcClsName  TyCon

EVERY data constructor (incl for newtypes) has the former two (the
data con itself, and its worker.  But only some data constructors have a
wrapper (see Note [The need for a wrapper]).

Each of these three has a distinct Unique.  The &quot;data con itself&quot; name
appears in the output of the renamer, and names the Haskell-source
data constructor.  The type checker translates it into either the wrapper Id
(if it exists) or worker Id (otherwise).

The data con has one or two Ids associated with it:

The &quot;worker Id&quot;, is the actual data constructor.
* Every data constructor (newtype or data type) has a worker

* The worker is very like a primop, in that it has no binding.

* For a *data* type, the worker *is* the data constructor;
  it has no unfolding

* For a *newtype*, the worker has a compulsory unfolding which
  does a cast, e.g.
        newtype T = MkT Int
        The worker for MkT has unfolding
                \\(x:Int). x `cast` sym CoT
  Here CoT is the type constructor, witnessing the FC axiom
        axiom CoT : T = Int

The &quot;wrapper Id&quot;, \$WC, goes as follows

* Its type is exactly what it looks like in the source program.

* It is an ordinary function, and it gets a top-level binding
  like any other function.

* The wrapper Id isn't generated for a data type if there is
  nothing for the wrapper to do.  That is, if its defn would be
        \$wC = C

Note [Data constructor workers and wrappers]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Algebraic data types
  - Always have a worker, with no unfolding
  - May or may not have a wrapper; see Note [The need for a wrapper]

* Newtypes
  - Always have a worker, which has a compulsory unfolding (just a cast)
  - May or may not have a wrapper; see Note [The need for a wrapper]

* INVARIANT: the dictionary constructor for a class
             never has a wrapper.

* Neither_ the worker _nor_ the wrapper take the dcStupidTheta dicts as arguments

* The wrapper (if it exists) takes dcOrigArgTys as its arguments.
  The worker takes dataConRepArgTys as its arguments
  If the worker is absent, dataConRepArgTys is the same as dcOrigArgTys

* The 'NoDataConRep' case of DataConRep is important. Not only is it
  efficient, but it also ensures that the wrapper is replaced by the
  worker (because it *is* the worker) even when there are no
  args. E.g. in
               f (:) x
  the (:) *is* the worker.  This is really important in rule matching,
  (We could match on the wrappers, but that makes it less likely that
  rules will match when we bring bits of unfoldings together.)

Note [The need for a wrapper]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Why might the wrapper have anything to do?  The full story is
in wrapper_reqd in GHC.Types.Id.Make.mkDataConRep.

* Unboxing strict fields (with -funbox-strict-fields)
        data T = MkT !(Int,Int)
        \$wMkT :: (Int,Int) -&gt; T
        \$wMkT (x,y) = MkT x y
  Notice that the worker has two fields where the wapper has
  just one.  That is, the worker has type
                MkT :: Int -&gt; Int -&gt; T

* Equality constraints for GADTs
        data T a where { MkT :: a -&gt; T [a] }

  The worker gets a type with explicit equality
  constraints, thus:
        MkT :: forall a b. (a=[b]) =&gt; b -&gt; T a

  The wrapper has the programmer-specified type:
        \$wMkT :: a -&gt; T [a]
        \$wMkT a x = MkT [a] a [a] x
  The third argument is a coercion
        [a] :: [a]~[a]

* Data family instances may do a cast on the result

* Type variables may be permuted; see MkId
  Note [Data con wrappers and GADT syntax]


Note [The stupid context]
~~~~~~~~~~~~~~~~~~~~~~~~~
Data types can have a context:

        data (Eq a, Ord b) =&gt; T a b = T1 a b | T2 a

and that makes the constructors have a context too
(notice that T2's context is &quot;thinned&quot;):

        T1 :: (Eq a, Ord b) =&gt; a -&gt; b -&gt; T a b
        T2 :: (Eq a) =&gt; a -&gt; T a b

Furthermore, this context pops up when pattern matching
(though GHC hasn't implemented this, but it is in H98, and
I've fixed GHC so that it now does):

        f (T2 x) = x
gets inferred type
        f :: Eq a =&gt; T a b -&gt; a

I say the context is &quot;stupid&quot; because the dictionaries passed
are immediately discarded -- they do nothing and have no benefit.
It's a flaw in the language.

        Up to now [March 2002] I have put this stupid context into the
        type of the &quot;wrapper&quot; constructors functions, T1 and T2, but
        that turned out to be jolly inconvenient for generics, and
        record update, and other functions that build values of type T
        (because they don't have suitable dictionaries available).

        So now I've taken the stupid context out.  I simply deal with
        it separately in the type checker on occurrences of a
        constructor, either in an expression or in a pattern.

        [May 2003: actually I think this decision could easily be
        reversed now, and probably should be.  Generics could be
        disabled for types with a stupid context; record updates now
        (H98) needs the context too; etc.  It's an unforced change, so
        I'm leaving it for now --- but it does seem odd that the
        wrapper doesn't include the stupid context.]

[July 04] With the advent of generalised data types, it's less obvious
what the &quot;stupid context&quot; is.  Consider
        C :: forall a. Ord a =&gt; a -&gt; a -&gt; T (Foo a)
Does the C constructor in Core contain the Ord dictionary?  Yes, it must:

        f :: T b -&gt; Ordering
        f = /\b. \x:T b.
            case x of
                C a (d:Ord a) (p:a) (q:a) -&gt; compare d p q

Note that (Foo a) might not be an instance of Ord.

************************************************************************
*                                                                      *
\subsection{Data constructors}
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-302"></span><span>
</span><span id="line-303"></span><span class="hs-comment">-- | A data constructor</span><span>
</span><span id="line-304"></span><span class="hs-comment">--</span><span>
</span><span id="line-305"></span><span class="hs-comment">-- - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnOpen',</span><span>
</span><span id="line-306"></span><span class="hs-comment">--             'GHC.Parser.Annotation.AnnClose','GHC.Parser.Annotation.AnnComma'</span><span>
</span><span id="line-307"></span><span>
</span><span id="line-308"></span><span class="hs-comment">-- For details on above see note [Api annotations] in GHC.Parser.Annotation</span><span>
</span><span id="line-309"></span><span class="hs-keyword">data</span><span> </span><span id="DataCon"><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-var">DataCon</span></a></span></span><span>
</span><span id="line-310"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="MkData"><span class="annot"><a href="GHC.Core.DataCon.html#MkData"><span class="hs-identifier hs-var">MkData</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-311"></span><span>        </span><span id="dcName"><span class="annot"><span class="annottext">DataCon -&gt; Name
</span><a href="GHC.Core.DataCon.html#dcName"><span class="hs-identifier hs-var hs-var">dcName</span></a></span></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">,</span><span>      </span><span class="hs-comment">-- This is the name of the *source data con*</span><span>
</span><span id="line-312"></span><span>                                </span><span class="hs-comment">-- (see &quot;Note [Data Constructor Naming]&quot; above)</span><span>
</span><span id="line-313"></span><span>        </span><span id="dcUnique"><span class="annot"><span class="annottext">DataCon -&gt; Unique
</span><a href="GHC.Core.DataCon.html#dcUnique"><span class="hs-identifier hs-var hs-var">dcUnique</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span class="hs-special">,</span><span>     </span><span class="hs-comment">-- Cached from Name</span><span>
</span><span id="line-314"></span><span>        </span><span id="dcTag"><span class="annot"><span class="annottext">DataCon -&gt; Arity
</span><a href="GHC.Core.DataCon.html#dcTag"><span class="hs-identifier hs-var hs-var">dcTag</span></a></span></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#ConTag"><span class="hs-identifier hs-type">ConTag</span></a></span><span class="hs-special">,</span><span>     </span><span class="hs-comment">-- ^ Tag, used for ordering 'DataCon's</span><span>
</span><span id="line-315"></span><span>
</span><span id="line-316"></span><span>        </span><span class="hs-comment">-- Running example:</span><span>
</span><span id="line-317"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-318"></span><span>        </span><span class="hs-comment">--      *** As declared by the user</span><span>
</span><span id="line-319"></span><span>        </span><span class="hs-comment">--  data T a b c where</span><span>
</span><span id="line-320"></span><span>        </span><span class="hs-comment">--    MkT :: forall c y x b. (x~y,Ord x) =&gt; x -&gt; y -&gt; T (x,y) b c</span><span>
</span><span id="line-321"></span><span>
</span><span id="line-322"></span><span>        </span><span class="hs-comment">--      *** As represented internally</span><span>
</span><span id="line-323"></span><span>        </span><span class="hs-comment">--  data T a b c where</span><span>
</span><span id="line-324"></span><span>        </span><span class="hs-comment">--    MkT :: forall a b c. forall x y. (a~(x,y),x~y,Ord x)</span><span>
</span><span id="line-325"></span><span>        </span><span class="hs-comment">--        =&gt; x -&gt; y -&gt; T a b c</span><span>
</span><span id="line-326"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-327"></span><span>        </span><span class="hs-comment">-- The next six fields express the type of the constructor, in pieces</span><span>
</span><span id="line-328"></span><span>        </span><span class="hs-comment">-- e.g.</span><span>
</span><span id="line-329"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-330"></span><span>        </span><span class="hs-comment">--      dcUnivTyVars       = [a,b,c]</span><span>
</span><span id="line-331"></span><span>        </span><span class="hs-comment">--      dcExTyCoVars       = [x,y]</span><span>
</span><span id="line-332"></span><span>        </span><span class="hs-comment">--      dcUserTyVarBinders = [c,y,x,b]</span><span>
</span><span id="line-333"></span><span>        </span><span class="hs-comment">--      dcEqSpec           = [a~(x,y)]</span><span>
</span><span id="line-334"></span><span>        </span><span class="hs-comment">--      dcOtherTheta       = [x~y, Ord x]</span><span>
</span><span id="line-335"></span><span>        </span><span class="hs-comment">--      dcOrigArgTys       = [x,y]</span><span>
</span><span id="line-336"></span><span>        </span><span class="hs-comment">--      dcRepTyCon         = T</span><span>
</span><span id="line-337"></span><span>
</span><span id="line-338"></span><span>        </span><span class="hs-comment">-- In general, the dcUnivTyVars are NOT NECESSARILY THE SAME AS THE</span><span>
</span><span id="line-339"></span><span>        </span><span class="hs-comment">-- TYVARS FOR THE PARENT TyCon. (This is a change (Oct05): previously,</span><span>
</span><span id="line-340"></span><span>        </span><span class="hs-comment">-- vanilla datacons guaranteed to have the same type variables as their</span><span>
</span><span id="line-341"></span><span>        </span><span class="hs-comment">-- parent TyCon, but that seems ugly.) They can be different in the case</span><span>
</span><span id="line-342"></span><span>        </span><span class="hs-comment">-- where a GADT constructor uses different names for the universal</span><span>
</span><span id="line-343"></span><span>        </span><span class="hs-comment">-- tyvars than does the tycon. For example:</span><span>
</span><span id="line-344"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-345"></span><span>        </span><span class="hs-comment">--   data H a where</span><span>
</span><span id="line-346"></span><span>        </span><span class="hs-comment">--     MkH :: b -&gt; H b</span><span>
</span><span id="line-347"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-348"></span><span>        </span><span class="hs-comment">-- Here, the tyConTyVars of H will be [a], but the dcUnivTyVars of MkH</span><span>
</span><span id="line-349"></span><span>        </span><span class="hs-comment">-- will be [b].</span><span>
</span><span id="line-350"></span><span>
</span><span id="line-351"></span><span>        </span><span id="dcVanilla"><span class="annot"><span class="annottext">DataCon -&gt; Bool
</span><a href="GHC.Core.DataCon.html#dcVanilla"><span class="hs-identifier hs-var hs-var">dcVanilla</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">,</span><span>      </span><span class="hs-comment">-- True &lt;=&gt; This is a vanilla Haskell 98 data constructor</span><span>
</span><span id="line-352"></span><span>                                </span><span class="hs-comment">--          Its type is of form</span><span>
</span><span id="line-353"></span><span>                                </span><span class="hs-comment">--              forall a1..an . t1 -&gt; ... tm -&gt; T a1..an</span><span>
</span><span id="line-354"></span><span>                                </span><span class="hs-comment">--          No existentials, no coercions, nothing.</span><span>
</span><span id="line-355"></span><span>                                </span><span class="hs-comment">-- That is: dcExTyCoVars = dcEqSpec = dcOtherTheta = []</span><span>
</span><span id="line-356"></span><span>                </span><span class="hs-comment">-- NB 1: newtypes always have a vanilla data con</span><span>
</span><span id="line-357"></span><span>                </span><span class="hs-comment">-- NB 2: a vanilla constructor can still be declared in GADT-style</span><span>
</span><span id="line-358"></span><span>                </span><span class="hs-comment">--       syntax, provided its type looks like the above.</span><span>
</span><span id="line-359"></span><span>                </span><span class="hs-comment">--       The declaration format is held in the TyCon (algTcGadtSyntax)</span><span>
</span><span id="line-360"></span><span>
</span><span id="line-361"></span><span>        </span><span class="hs-comment">-- Universally-quantified type vars [a,b,c]</span><span>
</span><span id="line-362"></span><span>        </span><span class="hs-comment">-- INVARIANT: length matches arity of the dcRepTyCon</span><span>
</span><span id="line-363"></span><span>        </span><span class="hs-comment">-- INVARIANT: result type of data con worker is exactly (T a b c)</span><span>
</span><span id="line-364"></span><span>        </span><span class="hs-comment">-- COROLLARY: The dcUnivTyVars are always in one-to-one correspondence with</span><span>
</span><span id="line-365"></span><span>        </span><span class="hs-comment">--            the tyConTyVars of the parent TyCon</span><span>
</span><span id="line-366"></span><span>        </span><span id="dcUnivTyVars"><span class="annot"><span class="annottext">DataCon -&gt; [TyVar]
</span><a href="GHC.Core.DataCon.html#dcUnivTyVars"><span class="hs-identifier hs-var hs-var">dcUnivTyVars</span></a></span></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#TyVar"><span class="hs-identifier hs-type">TyVar</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-367"></span><span>
</span><span id="line-368"></span><span>        </span><span class="hs-comment">-- Existentially-quantified type and coercion vars [x,y]</span><span>
</span><span id="line-369"></span><span>        </span><span class="hs-comment">-- For an example involving coercion variables,</span><span>
</span><span id="line-370"></span><span>        </span><span class="hs-comment">-- Why tycovars? See Note [Existential coercion variables]</span><span>
</span><span id="line-371"></span><span>        </span><span id="dcExTyCoVars"><span class="annot"><span class="annottext">DataCon -&gt; [TyVar]
</span><a href="GHC.Core.DataCon.html#dcExTyCoVars"><span class="hs-identifier hs-var hs-var">dcExTyCoVars</span></a></span></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#TyCoVar"><span class="hs-identifier hs-type">TyCoVar</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-372"></span><span>
</span><span id="line-373"></span><span>        </span><span class="hs-comment">-- INVARIANT: the UnivTyVars and ExTyCoVars all have distinct OccNames</span><span>
</span><span id="line-374"></span><span>        </span><span class="hs-comment">-- Reason: less confusing, and easier to generate Iface syntax</span><span>
</span><span id="line-375"></span><span>
</span><span id="line-376"></span><span>        </span><span class="hs-comment">-- The type/coercion vars in the order the user wrote them [c,y,x,b]</span><span>
</span><span id="line-377"></span><span>        </span><span class="hs-comment">-- INVARIANT: the set of tyvars in dcUserTyVarBinders is exactly the set</span><span>
</span><span id="line-378"></span><span>        </span><span class="hs-comment">--            of tyvars (*not* covars) of dcExTyCoVars unioned with the</span><span>
</span><span id="line-379"></span><span>        </span><span class="hs-comment">--            set of dcUnivTyVars whose tyvars do not appear in dcEqSpec</span><span>
</span><span id="line-380"></span><span>        </span><span class="hs-comment">-- See Note [DataCon user type variable binders]</span><span>
</span><span id="line-381"></span><span>        </span><span id="dcUserTyVarBinders"><span class="annot"><span class="annottext">DataCon -&gt; [InvisTVBinder]
</span><a href="GHC.Core.DataCon.html#dcUserTyVarBinders"><span class="hs-identifier hs-var hs-var">dcUserTyVarBinders</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#InvisTVBinder"><span class="hs-identifier hs-type">InvisTVBinder</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-382"></span><span>
</span><span id="line-383"></span><span>        </span><span id="dcEqSpec"><span class="annot"><span class="annottext">DataCon -&gt; [EqSpec]
</span><a href="GHC.Core.DataCon.html#dcEqSpec"><span class="hs-identifier hs-var hs-var">dcEqSpec</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.DataCon.html#EqSpec"><span class="hs-identifier hs-type">EqSpec</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>   </span><span class="hs-comment">-- Equalities derived from the result type,</span><span>
</span><span id="line-384"></span><span>                                </span><span class="hs-comment">-- _as written by the programmer_.</span><span>
</span><span id="line-385"></span><span>                                </span><span class="hs-comment">-- Only non-dependent GADT equalities (dependent</span><span>
</span><span id="line-386"></span><span>                                </span><span class="hs-comment">-- GADT equalities are in the covars of</span><span>
</span><span id="line-387"></span><span>                                </span><span class="hs-comment">-- dcExTyCoVars).</span><span>
</span><span id="line-388"></span><span>
</span><span id="line-389"></span><span>                </span><span class="hs-comment">-- This field allows us to move conveniently between the two ways</span><span>
</span><span id="line-390"></span><span>                </span><span class="hs-comment">-- of representing a GADT constructor's type:</span><span>
</span><span id="line-391"></span><span>                </span><span class="hs-comment">--      MkT :: forall a b. (a ~ [b]) =&gt; b -&gt; T a</span><span>
</span><span id="line-392"></span><span>                </span><span class="hs-comment">--      MkT :: forall b. b -&gt; T [b]</span><span>
</span><span id="line-393"></span><span>                </span><span class="hs-comment">-- Each equality is of the form (a ~ ty), where 'a' is one of</span><span>
</span><span id="line-394"></span><span>                </span><span class="hs-comment">-- the universally quantified type variables. Moreover, the</span><span>
</span><span id="line-395"></span><span>                </span><span class="hs-comment">-- only place in the DataCon where this 'a' will occur is in</span><span>
</span><span id="line-396"></span><span>                </span><span class="hs-comment">-- dcUnivTyVars. See [The dcEqSpec domain invariant].</span><span>
</span><span id="line-397"></span><span>
</span><span id="line-398"></span><span>                </span><span class="hs-comment">-- The next two fields give the type context of the data constructor</span><span>
</span><span id="line-399"></span><span>                </span><span class="hs-comment">--      (aside from the GADT constraints,</span><span>
</span><span id="line-400"></span><span>                </span><span class="hs-comment">--       which are given by the dcExpSpec)</span><span>
</span><span id="line-401"></span><span>                </span><span class="hs-comment">-- In GADT form, this is *exactly* what the programmer writes, even if</span><span>
</span><span id="line-402"></span><span>                </span><span class="hs-comment">-- the context constrains only universally quantified variables</span><span>
</span><span id="line-403"></span><span>                </span><span class="hs-comment">--      MkT :: forall a b. (a ~ b, Ord b) =&gt; a -&gt; T a b</span><span>
</span><span id="line-404"></span><span>        </span><span id="dcOtherTheta"><span class="annot"><span class="annottext">DataCon -&gt; [Type]
</span><a href="GHC.Core.DataCon.html#dcOtherTheta"><span class="hs-identifier hs-var hs-var">dcOtherTheta</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#ThetaType"><span class="hs-identifier hs-type">ThetaType</span></a></span><span class="hs-special">,</span><span>  </span><span class="hs-comment">-- The other constraints in the data con's type</span><span>
</span><span id="line-405"></span><span>                                    </span><span class="hs-comment">-- other than those in the dcEqSpec</span><span>
</span><span id="line-406"></span><span>
</span><span id="line-407"></span><span>        </span><span id="dcStupidTheta"><span class="annot"><span class="annottext">DataCon -&gt; [Type]
</span><a href="GHC.Core.DataCon.html#dcStupidTheta"><span class="hs-identifier hs-var hs-var">dcStupidTheta</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#ThetaType"><span class="hs-identifier hs-type">ThetaType</span></a></span><span class="hs-special">,</span><span>     </span><span class="hs-comment">-- The context of the data type declaration</span><span>
</span><span id="line-408"></span><span>                                        </span><span class="hs-comment">--      data Eq a =&gt; T a = ...</span><span>
</span><span id="line-409"></span><span>                                        </span><span class="hs-comment">-- or, rather, a &quot;thinned&quot; version thereof</span><span>
</span><span id="line-410"></span><span>                </span><span class="hs-comment">-- &quot;Thinned&quot;, because the Report says</span><span>
</span><span id="line-411"></span><span>                </span><span class="hs-comment">-- to eliminate any constraints that don't mention</span><span>
</span><span id="line-412"></span><span>                </span><span class="hs-comment">-- tyvars free in the arg types for this constructor</span><span>
</span><span id="line-413"></span><span>                </span><span class="hs-comment">--</span><span>
</span><span id="line-414"></span><span>                </span><span class="hs-comment">-- INVARIANT: the free tyvars of dcStupidTheta are a subset of dcUnivTyVars</span><span>
</span><span id="line-415"></span><span>                </span><span class="hs-comment">-- Reason: dcStupidTeta is gotten by thinning the stupid theta from the tycon</span><span>
</span><span id="line-416"></span><span>                </span><span class="hs-comment">--</span><span>
</span><span id="line-417"></span><span>                </span><span class="hs-comment">-- &quot;Stupid&quot;, because the dictionaries aren't used for anything.</span><span>
</span><span id="line-418"></span><span>                </span><span class="hs-comment">-- Indeed, [as of March 02] they are no longer in the type of</span><span>
</span><span id="line-419"></span><span>                </span><span class="hs-comment">-- the wrapper Id, because that makes it harder to use the wrap-id</span><span>
</span><span id="line-420"></span><span>                </span><span class="hs-comment">-- to rebuild values after record selection or in generics.</span><span>
</span><span id="line-421"></span><span>
</span><span id="line-422"></span><span>        </span><span id="dcOrigArgTys"><span class="annot"><span class="annottext">DataCon -&gt; [Scaled Type]
</span><a href="GHC.Core.DataCon.html#dcOrigArgTys"><span class="hs-identifier hs-var hs-var">dcOrigArgTys</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Scaled"><span class="hs-identifier hs-type">Scaled</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>  </span><span class="hs-comment">-- Original argument types</span><span>
</span><span id="line-423"></span><span>                                        </span><span class="hs-comment">-- (before unboxing and flattening of strict fields)</span><span>
</span><span id="line-424"></span><span>        </span><span id="dcOrigResTy"><span class="annot"><span class="annottext">DataCon -&gt; Type
</span><a href="GHC.Core.DataCon.html#dcOrigResTy"><span class="hs-identifier hs-var hs-var">dcOrigResTy</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">,</span><span>            </span><span class="hs-comment">-- Original result type, as seen by the user</span><span>
</span><span id="line-425"></span><span>                </span><span class="hs-comment">-- NB: for a data instance, the original user result type may</span><span>
</span><span id="line-426"></span><span>                </span><span class="hs-comment">-- differ from the DataCon's representation TyCon.  Example</span><span>
</span><span id="line-427"></span><span>                </span><span class="hs-comment">--      data instance T [a] where MkT :: a -&gt; T [a]</span><span>
</span><span id="line-428"></span><span>                </span><span class="hs-comment">-- The dcOrigResTy is T [a], but the dcRepTyCon might be R:TList</span><span>
</span><span id="line-429"></span><span>
</span><span id="line-430"></span><span>        </span><span class="hs-comment">-- Now the strictness annotations and field labels of the constructor</span><span>
</span><span id="line-431"></span><span>        </span><span id="dcSrcBangs"><span class="annot"><span class="annottext">DataCon -&gt; [HsSrcBang]
</span><a href="GHC.Core.DataCon.html#dcSrcBangs"><span class="hs-identifier hs-var hs-var">dcSrcBangs</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.DataCon.html#HsSrcBang"><span class="hs-identifier hs-type">HsSrcBang</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-432"></span><span>                </span><span class="hs-comment">-- See Note [Bangs on data constructor arguments]</span><span>
</span><span id="line-433"></span><span>                </span><span class="hs-comment">--</span><span>
</span><span id="line-434"></span><span>                </span><span class="hs-comment">-- The [HsSrcBang] as written by the programmer.</span><span>
</span><span id="line-435"></span><span>                </span><span class="hs-comment">--</span><span>
</span><span id="line-436"></span><span>                </span><span class="hs-comment">-- Matches 1-1 with dcOrigArgTys</span><span>
</span><span id="line-437"></span><span>                </span><span class="hs-comment">-- Hence length = dataConSourceArity dataCon</span><span>
</span><span id="line-438"></span><span>
</span><span id="line-439"></span><span>        </span><span id="dcFields"><span class="annot"><span class="annottext">DataCon -&gt; [FieldLabel]
</span><a href="GHC.Core.DataCon.html#dcFields"><span class="hs-identifier hs-var hs-var">dcFields</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.FieldLabel.html#FieldLabel"><span class="hs-identifier hs-type">FieldLabel</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-440"></span><span>                </span><span class="hs-comment">-- Field labels for this constructor, in the</span><span>
</span><span id="line-441"></span><span>                </span><span class="hs-comment">-- same order as the dcOrigArgTys;</span><span>
</span><span id="line-442"></span><span>                </span><span class="hs-comment">-- length = 0 (if not a record) or dataConSourceArity.</span><span>
</span><span id="line-443"></span><span>
</span><span id="line-444"></span><span>        </span><span class="hs-comment">-- The curried worker function that corresponds to the constructor:</span><span>
</span><span id="line-445"></span><span>        </span><span class="hs-comment">-- It doesn't have an unfolding; the code generator saturates these Ids</span><span>
</span><span id="line-446"></span><span>        </span><span class="hs-comment">-- and allocates a real constructor when it finds one.</span><span>
</span><span id="line-447"></span><span>        </span><span id="dcWorkId"><span class="annot"><span class="annottext">DataCon -&gt; TyVar
</span><a href="GHC.Core.DataCon.html#dcWorkId"><span class="hs-identifier hs-var hs-var">dcWorkId</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-448"></span><span>
</span><span id="line-449"></span><span>        </span><span class="hs-comment">-- Constructor representation</span><span>
</span><span id="line-450"></span><span>        </span><span id="dcRep"><span class="annot"><span class="annottext">DataCon -&gt; DataConRep
</span><a href="GHC.Core.DataCon.html#dcRep"><span class="hs-identifier hs-var hs-var">dcRep</span></a></span></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataConRep"><span class="hs-identifier hs-type">DataConRep</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-451"></span><span>
</span><span id="line-452"></span><span>        </span><span class="hs-comment">-- Cached; see Note [DataCon arities]</span><span>
</span><span id="line-453"></span><span>        </span><span class="hs-comment">-- INVARIANT: dcRepArity    == length dataConRepArgTys + count isCoVar (dcExTyCoVars)</span><span>
</span><span id="line-454"></span><span>        </span><span class="hs-comment">-- INVARIANT: dcSourceArity == length dcOrigArgTys</span><span>
</span><span id="line-455"></span><span>        </span><span id="dcRepArity"><span class="annot"><span class="annottext">DataCon -&gt; Arity
</span><a href="GHC.Core.DataCon.html#dcRepArity"><span class="hs-identifier hs-var hs-var">dcRepArity</span></a></span></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Arity"><span class="hs-identifier hs-type">Arity</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-456"></span><span>        </span><span id="dcSourceArity"><span class="annot"><span class="annottext">DataCon -&gt; Arity
</span><a href="GHC.Core.DataCon.html#dcSourceArity"><span class="hs-identifier hs-var hs-var">dcSourceArity</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Arity"><span class="hs-identifier hs-type">Arity</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-457"></span><span>
</span><span id="line-458"></span><span>        </span><span class="hs-comment">-- Result type of constructor is T t1..tn</span><span>
</span><span id="line-459"></span><span>        </span><span id="dcRepTyCon"><span class="annot"><span class="annottext">DataCon -&gt; TyCon
</span><a href="GHC.Core.DataCon.html#dcRepTyCon"><span class="hs-identifier hs-var hs-var">dcRepTyCon</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html#TyCon"><span class="hs-identifier hs-type">TyCon</span></a></span><span class="hs-special">,</span><span>           </span><span class="hs-comment">-- Result tycon, T</span><span>
</span><span id="line-460"></span><span>
</span><span id="line-461"></span><span>        </span><span id="dcRepType"><span class="annot"><span class="annottext">DataCon -&gt; Type
</span><a href="GHC.Core.DataCon.html#dcRepType"><span class="hs-identifier hs-var hs-var">dcRepType</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">,</span><span>    </span><span class="hs-comment">-- Type of the constructor</span><span>
</span><span id="line-462"></span><span>                                </span><span class="hs-comment">--      forall a x y. (a~(x,y), x~y, Ord x) =&gt;</span><span>
</span><span id="line-463"></span><span>                                </span><span class="hs-comment">--        x -&gt; y -&gt; T a</span><span>
</span><span id="line-464"></span><span>                                </span><span class="hs-comment">-- (this is *not* of the constructor wrapper Id:</span><span>
</span><span id="line-465"></span><span>                                </span><span class="hs-comment">--  see Note [Data con representation] below)</span><span>
</span><span id="line-466"></span><span>        </span><span class="hs-comment">-- Notice that the existential type parameters come *second*.</span><span>
</span><span id="line-467"></span><span>        </span><span class="hs-comment">-- Reason: in a case expression we may find:</span><span>
</span><span id="line-468"></span><span>        </span><span class="hs-comment">--      case (e :: T t) of</span><span>
</span><span id="line-469"></span><span>        </span><span class="hs-comment">--        MkT x y co1 co2 (d:Ord x) (v:r) (w:F s) -&gt; ...</span><span>
</span><span id="line-470"></span><span>        </span><span class="hs-comment">-- It's convenient to apply the rep-type of MkT to 't', to get</span><span>
</span><span id="line-471"></span><span>        </span><span class="hs-comment">--      forall x y. (t~(x,y), x~y, Ord x) =&gt; x -&gt; y -&gt; T t</span><span>
</span><span id="line-472"></span><span>        </span><span class="hs-comment">-- and use that to check the pattern.  Mind you, this is really only</span><span>
</span><span id="line-473"></span><span>        </span><span class="hs-comment">-- used in GHC.Core.Lint.</span><span>
</span><span id="line-474"></span><span>
</span><span id="line-475"></span><span>
</span><span id="line-476"></span><span>        </span><span id="dcInfix"><span class="annot"><span class="annottext">DataCon -&gt; Bool
</span><a href="GHC.Core.DataCon.html#dcInfix"><span class="hs-identifier hs-var hs-var">dcInfix</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">,</span><span>        </span><span class="hs-comment">-- True &lt;=&gt; declared infix</span><span>
</span><span id="line-477"></span><span>                                </span><span class="hs-comment">-- Used for Template Haskell and 'deriving' only</span><span>
</span><span id="line-478"></span><span>                                </span><span class="hs-comment">-- The actual fixity is stored elsewhere</span><span>
</span><span id="line-479"></span><span>
</span><span id="line-480"></span><span>        </span><span id="dcPromoted"><span class="annot"><span class="annottext">DataCon -&gt; TyCon
</span><a href="GHC.Core.DataCon.html#dcPromoted"><span class="hs-identifier hs-var hs-var">dcPromoted</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html#TyCon"><span class="hs-identifier hs-type">TyCon</span></a></span><span>    </span><span class="hs-comment">-- The promoted TyCon</span><span>
</span><span id="line-481"></span><span>                               </span><span class="hs-comment">-- See Note [Promoted data constructors] in GHC.Core.TyCon</span><span>
</span><span id="line-482"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-483"></span><span>
</span><span id="line-484"></span><span>
</span><span id="line-485"></span><span class="hs-comment">{- Note [TyVarBinders in DataCons]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For the TyVarBinders in a DataCon and PatSyn:

 * Each argument flag is Inferred or Specified.
   None are Required. (A DataCon is a term-level function; see
   Note [No Required TyCoBinder in terms] in GHC.Core.TyCo.Rep.)

Why do we need the TyVarBinders, rather than just the TyVars?  So that
we can construct the right type for the DataCon with its foralls
attributed the correct visibility.  That in turn governs whether you
can use visible type application at a call of the data constructor.

See also [DataCon user type variable binders] for an extended discussion on the
order in which TyVarBinders appear in a DataCon.

Note [Existential coercion variables]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For now (Aug 2018) we can't write coercion quantifications in source Haskell, but
we can in Core. Consider having:

  data T :: forall k. k -&gt; k -&gt; Constraint where
    MkT :: forall k (a::k) (b::k). forall k' (c::k') (co::k'~k). (b~(c|&gt;co))
        =&gt; T k a b

  dcUnivTyVars       = [k,a,b]
  dcExTyCoVars       = [k',c,co]
  dcUserTyVarBinders = [k,a,k',c]
  dcEqSpec           = [b~(c|&gt;co)]
  dcOtherTheta       = []
  dcOrigArgTys       = []
  dcRepTyCon         = T

  Function call 'dataConKindEqSpec' returns [k'~k]

Note [DataCon arities]
~~~~~~~~~~~~~~~~~~~~~~
dcSourceArity does not take constraints into account,
but dcRepArity does.  For example:
   MkT :: Ord a =&gt; a -&gt; T a
    dcSourceArity = 1
    dcRepArity    = 2

Note [DataCon user type variable binders]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In System FC, data constructor type signatures always quantify over all of
their universal type variables, followed by their existential type variables.
Normally, this isn't a problem, as most datatypes naturally quantify their type
variables in this order anyway. For example:

  data T a b = forall c. MkT b c

Here, we have `MkT :: forall {k} (a :: k) (b :: *) (c :: *). b -&gt; c -&gt; T a b`,
where k, a, and b are universal and c is existential. (The inferred variable k
isn't available for TypeApplications, hence why it's in braces.) This is a
perfectly reasonable order to use, as the syntax of H98-style datatypes
(+ ExistentialQuantification) suggests it.

Things become more complicated when GADT syntax enters the picture. Consider
this example:

  data X a where
    MkX :: forall b a. b -&gt; Proxy a -&gt; X a

If we adopt the earlier approach of quantifying all the universal variables
followed by all the existential ones, GHC would come up with this type
signature for MkX:

  MkX :: forall {k} (a :: k) (b :: *). b -&gt; Proxy a -&gt; X a

But this is not what we want at all! After all, if a user were to use
TypeApplications on MkX, they would expect to instantiate `b` before `a`,
as that's the order in which they were written in the `forall`. (See #11721.)
Instead, we'd like GHC to come up with this type signature:

  MkX :: forall {k} (b :: *) (a :: k). b -&gt; Proxy a -&gt; X a

In fact, even if we left off the explicit forall:

  data X a where
    MkX :: b -&gt; Proxy a -&gt; X a

Then a user should still expect `b` to be quantified before `a`, since
according to the rules of TypeApplications, in the absence of `forall` GHC
performs a stable topological sort on the type variables in the user-written
type signature, which would place `b` before `a`.

But as noted above, enacting this behavior is not entirely trivial, as System
FC demands the variables go in universal-then-existential order under the hood.
Our solution is thus to equip DataCon with two different sets of type
variables:

* dcUnivTyVars and dcExTyCoVars, for the universal type variable and existential
  type/coercion variables, respectively. Their order is irrelevant for the
  purposes of TypeApplications, and as a consequence, they do not come equipped
  with visibilities (that is, they are TyVars/TyCoVars instead of
  TyCoVarBinders).

* dcUserTyVarBinders, for the type variables binders in the order in which they
  originally arose in the user-written type signature. Their order *does* matter
  for TypeApplications, so they are full TyVarBinders, complete with
  visibilities.

This encoding has some redundancy. The set of tyvars in dcUserTyVarBinders
consists precisely of:

* The set of tyvars in dcUnivTyVars whose type variables do not appear in
  dcEqSpec, unioned with:
* The set of tyvars (*not* covars) in dcExTyCoVars
  No covars here because because they're not user-written

The word &quot;set&quot; is used above because the order in which the tyvars appear in
dcUserTyVarBinders can be completely different from the order in dcUnivTyVars or
dcExTyCoVars. That is, the tyvars in dcUserTyVarBinders are a permutation of
(tyvars of dcExTyCoVars + a subset of dcUnivTyVars). But aside from the
ordering, they in fact share the same type variables (with the same Uniques). We
sometimes refer to this as &quot;the dcUserTyVarBinders invariant&quot;.

dcUserTyVarBinders, as the name suggests, is the one that users will
see most of the time. It's used when computing the type signature of a
data constructor wrapper (see dataConWrapperType), and as a result,
it's what matters from a TypeApplications perspective.

Note [The dcEqSpec domain invariant]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Consider this example of a GADT constructor:

  data Y a where
    MkY :: Bool -&gt; Y Bool

The user-written type of MkY is `Bool -&gt; Y Bool`, but what is the underlying
Core type for MkY? There are two conceivable possibilities:

1. MkY :: forall a. (a ~# Bool) =&gt; Bool -&gt; Y a
2. MkY :: forall a. (a ~# Bool) =&gt; a    -&gt; Y a

In practice, GHC picks (1) as the Core type for MkY. This is because we
maintain an invariant that the type variables in the domain of dcEqSpec will
only ever appear in the dcUnivTyVars. As a consequence, the type variables in
the domain of dcEqSpec will /never/ appear in the dcExTyCoVars, dcOtherTheta,
dcOrigArgTys, or dcOrigResTy; these can only ever mention variables from
dcUserTyVarBinders, which excludes things in the domain of dcEqSpec.
(See Note [DataCon user type variable binders].) This explains why GHC would
not pick (2) as the Core type, since the argument type `a` mentions a type
variable in the dcEqSpec.

There are certain parts of the codebase where it is convenient to apply the
substitution arising from the dcEqSpec to the dcUnivTyVars in order to obtain
the user-written return type of a GADT constructor. A consequence of the
dcEqSpec domain invariant is that you /never/ need to apply the substitution
to any other part of the constructor type, as they don't require it.
-}</span><span>
</span><span id="line-638"></span><span>
</span><span id="line-639"></span><span class="hs-comment">-- | Data Constructor Representation</span><span>
</span><span id="line-640"></span><span class="hs-comment">-- See Note [Data constructor workers and wrappers]</span><span>
</span><span id="line-641"></span><span class="hs-keyword">data</span><span> </span><span id="DataConRep"><span class="annot"><a href="GHC.Core.DataCon.html#DataConRep"><span class="hs-identifier hs-var">DataConRep</span></a></span></span><span>
</span><span id="line-642"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-comment">-- NoDataConRep means that the data con has no wrapper</span><span>
</span><span id="line-643"></span><span>    </span><span id="NoDataConRep"><span class="annot"><a href="GHC.Core.DataCon.html#NoDataConRep"><span class="hs-identifier hs-var">NoDataConRep</span></a></span></span><span>
</span><span id="line-644"></span><span>
</span><span id="line-645"></span><span>    </span><span class="hs-comment">-- DCR means that the data con has a wrapper</span><span>
</span><span id="line-646"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="DCR"><span class="annot"><a href="GHC.Core.DataCon.html#DCR"><span class="hs-identifier hs-var">DCR</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="dcr_wrap_id"><span class="annot"><span class="annottext">DataConRep -&gt; TyVar
</span><a href="GHC.Core.DataCon.html#dcr_wrap_id"><span class="hs-identifier hs-var hs-var">dcr_wrap_id</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>   </span><span class="hs-comment">-- Takes src args, unboxes/flattens,</span><span>
</span><span id="line-647"></span><span>                              </span><span class="hs-comment">-- and constructs the representation</span><span>
</span><span id="line-648"></span><span>
</span><span id="line-649"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="dcr_boxer"><span class="annot"><span class="annottext">DataConRep -&gt; DataConBoxer
</span><a href="GHC.Core.DataCon.html#dcr_boxer"><span class="hs-identifier hs-var hs-var">dcr_boxer</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#DataConBoxer"><span class="hs-identifier hs-type">DataConBoxer</span></a></span><span>
</span><span id="line-650"></span><span>
</span><span id="line-651"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="dcr_arg_tys"><span class="annot"><span class="annottext">DataConRep -&gt; [Scaled Type]
</span><a href="GHC.Core.DataCon.html#dcr_arg_tys"><span class="hs-identifier hs-var hs-var">dcr_arg_tys</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Scaled"><span class="hs-identifier hs-type">Scaled</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span>    </span><span class="hs-comment">-- Final, representation argument types,</span><span>
</span><span id="line-652"></span><span>                                          </span><span class="hs-comment">-- after unboxing and flattening,</span><span>
</span><span id="line-653"></span><span>                                          </span><span class="hs-comment">-- and *including* all evidence args</span><span>
</span><span id="line-654"></span><span>
</span><span id="line-655"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="dcr_stricts"><span class="annot"><span class="annottext">DataConRep -&gt; [StrictnessMark]
</span><a href="GHC.Core.DataCon.html#dcr_stricts"><span class="hs-identifier hs-var hs-var">dcr_stricts</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.DataCon.html#StrictnessMark"><span class="hs-identifier hs-type">StrictnessMark</span></a></span><span class="hs-special">]</span><span>  </span><span class="hs-comment">-- 1-1 with dcr_arg_tys</span><span>
</span><span id="line-656"></span><span>                </span><span class="hs-comment">-- See also Note [Data-con worker strictness]</span><span>
</span><span id="line-657"></span><span>
</span><span id="line-658"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="dcr_bangs"><span class="annot"><span class="annottext">DataConRep -&gt; [HsImplBang]
</span><a href="GHC.Core.DataCon.html#dcr_bangs"><span class="hs-identifier hs-var hs-var">dcr_bangs</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.DataCon.html#HsImplBang"><span class="hs-identifier hs-type">HsImplBang</span></a></span><span class="hs-special">]</span><span>  </span><span class="hs-comment">-- The actual decisions made (including failures)</span><span>
</span><span id="line-659"></span><span>                                     </span><span class="hs-comment">-- about the original arguments; 1-1 with orig_arg_tys</span><span>
</span><span id="line-660"></span><span>                                     </span><span class="hs-comment">-- See Note [Bangs on data constructor arguments]</span><span>
</span><span id="line-661"></span><span>
</span><span id="line-662"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-663"></span><span>
</span><span id="line-664"></span><span class="hs-comment">-------------------------</span><span>
</span><span id="line-665"></span><span>
</span><span id="line-666"></span><span class="hs-comment">-- | Haskell Source Bang</span><span>
</span><span id="line-667"></span><span class="hs-comment">--</span><span>
</span><span id="line-668"></span><span class="hs-comment">-- Bangs on data constructor arguments as the user wrote them in the</span><span>
</span><span id="line-669"></span><span class="hs-comment">-- source code.</span><span>
</span><span id="line-670"></span><span class="hs-comment">--</span><span>
</span><span id="line-671"></span><span class="hs-comment">-- @(HsSrcBang _ SrcUnpack SrcLazy)@ and</span><span>
</span><span id="line-672"></span><span class="hs-comment">-- @(HsSrcBang _ SrcUnpack NoSrcStrict)@ (without StrictData) makes no sense, we</span><span>
</span><span id="line-673"></span><span class="hs-comment">-- emit a warning (in checkValidDataCon) and treat it like</span><span>
</span><span id="line-674"></span><span class="hs-comment">-- @(HsSrcBang _ NoSrcUnpack SrcLazy)@</span><span>
</span><span id="line-675"></span><span class="hs-keyword">data</span><span> </span><span id="HsSrcBang"><span class="annot"><a href="GHC.Core.DataCon.html#HsSrcBang"><span class="hs-identifier hs-var">HsSrcBang</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-676"></span><span>  </span><span id="HsSrcBang"><span class="annot"><a href="GHC.Core.DataCon.html#HsSrcBang"><span class="hs-identifier hs-var">HsSrcBang</span></a></span></span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#SourceText"><span class="hs-identifier hs-type">SourceText</span></a></span><span> </span><span class="hs-comment">-- Note [Pragma source text] in GHC.Types.Basic</span><span>
</span><span id="line-677"></span><span>            </span><span class="annot"><a href="GHC.Core.DataCon.html#SrcUnpackedness"><span class="hs-identifier hs-type">SrcUnpackedness</span></a></span><span>
</span><span id="line-678"></span><span>            </span><span class="annot"><a href="GHC.Core.DataCon.html#SrcStrictness"><span class="hs-identifier hs-type">SrcStrictness</span></a></span><span>
</span><span id="line-679"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span id="local-6989586621680823035"><span id="local-6989586621680823037"><span id="local-6989586621680823039"><span id="local-6989586621680823041"><span id="local-6989586621680823043"><span id="local-6989586621680823045"><span id="local-6989586621680823047"><span id="local-6989586621680823049"><span id="local-6989586621680823051"><span id="local-6989586621680823053"><span id="local-6989586621680823055"><span id="local-6989586621680823057"><span id="local-6989586621680823062"><span id="local-6989586621680823068"><span class="annot"><span class="annottext">Typeable HsSrcBang
Typeable HsSrcBang
-&gt; (forall (c :: * -&gt; *).
    (forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
    -&gt; (forall g. g -&gt; c g) -&gt; HsSrcBang -&gt; c HsSrcBang)
-&gt; (forall (c :: * -&gt; *).
    (forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
    -&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c HsSrcBang)
-&gt; (HsSrcBang -&gt; Constr)
-&gt; (HsSrcBang -&gt; DataType)
-&gt; (forall (t :: * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d. Data d =&gt; c (t d)) -&gt; Maybe (c HsSrcBang))
-&gt; (forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d e. (Data d, Data e) =&gt; c (t d e)) -&gt; Maybe (c HsSrcBang))
-&gt; ((forall b. Data b =&gt; b -&gt; b) -&gt; HsSrcBang -&gt; HsSrcBang)
-&gt; (forall r r'.
    (r -&gt; r' -&gt; r)
    -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsSrcBang -&gt; r)
-&gt; (forall r r'.
    (r' -&gt; r -&gt; r)
    -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsSrcBang -&gt; r)
-&gt; (forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; HsSrcBang -&gt; [u])
-&gt; (forall u.
    Arity -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; HsSrcBang -&gt; u)
-&gt; (forall (m :: * -&gt; *).
    Monad m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; HsSrcBang -&gt; m HsSrcBang)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; HsSrcBang -&gt; m HsSrcBang)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; HsSrcBang -&gt; m HsSrcBang)
-&gt; Data HsSrcBang
HsSrcBang -&gt; DataType
HsSrcBang -&gt; Constr
(forall b. Data b =&gt; b -&gt; b) -&gt; HsSrcBang -&gt; HsSrcBang
forall a.
Typeable a
-&gt; (forall (c :: * -&gt; *).
    (forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
    -&gt; (forall g. g -&gt; c g) -&gt; a -&gt; c a)
-&gt; (forall (c :: * -&gt; *).
    (forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
    -&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c a)
-&gt; (a -&gt; Constr)
-&gt; (a -&gt; DataType)
-&gt; (forall (t :: * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d. Data d =&gt; c (t d)) -&gt; Maybe (c a))
-&gt; (forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d e. (Data d, Data e) =&gt; c (t d e)) -&gt; Maybe (c a))
-&gt; ((forall b. Data b =&gt; b -&gt; b) -&gt; a -&gt; a)
-&gt; (forall r r'.
    (r -&gt; r' -&gt; r) -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; a -&gt; r)
-&gt; (forall r r'.
    (r' -&gt; r -&gt; r) -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; a -&gt; r)
-&gt; (forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; a -&gt; [u])
-&gt; (forall u. Arity -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; a -&gt; u)
-&gt; (forall (m :: * -&gt; *).
    Monad m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; Data a
forall u. Arity -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; HsSrcBang -&gt; u
forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; HsSrcBang -&gt; [u]
forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsSrcBang -&gt; r
forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsSrcBang -&gt; r
forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; HsSrcBang -&gt; m HsSrcBang
forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; HsSrcBang -&gt; m HsSrcBang
forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c HsSrcBang
forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; HsSrcBang -&gt; c HsSrcBang
forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c HsSrcBang)
forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e)) -&gt; Maybe (c HsSrcBang)
gmapMo :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; HsSrcBang -&gt; m HsSrcBang
$cgmapMo :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; HsSrcBang -&gt; m HsSrcBang
gmapMp :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; HsSrcBang -&gt; m HsSrcBang
$cgmapMp :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; HsSrcBang -&gt; m HsSrcBang
gmapM :: forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; HsSrcBang -&gt; m HsSrcBang
$cgmapM :: forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; HsSrcBang -&gt; m HsSrcBang
gmapQi :: forall u. Arity -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; HsSrcBang -&gt; u
$cgmapQi :: forall u. Arity -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; HsSrcBang -&gt; u
gmapQ :: forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; HsSrcBang -&gt; [u]
$cgmapQ :: forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; HsSrcBang -&gt; [u]
gmapQr :: forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsSrcBang -&gt; r
$cgmapQr :: forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsSrcBang -&gt; r
gmapQl :: forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsSrcBang -&gt; r
$cgmapQl :: forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsSrcBang -&gt; r
gmapT :: (forall b. Data b =&gt; b -&gt; b) -&gt; HsSrcBang -&gt; HsSrcBang
$cgmapT :: (forall b. Data b =&gt; b -&gt; b) -&gt; HsSrcBang -&gt; HsSrcBang
dataCast2 :: forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e)) -&gt; Maybe (c HsSrcBang)
$cdataCast2 :: forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e)) -&gt; Maybe (c HsSrcBang)
dataCast1 :: forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c HsSrcBang)
$cdataCast1 :: forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c HsSrcBang)
dataTypeOf :: HsSrcBang -&gt; DataType
$cdataTypeOf :: HsSrcBang -&gt; DataType
toConstr :: HsSrcBang -&gt; Constr
$ctoConstr :: HsSrcBang -&gt; Constr
gunfold :: forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c HsSrcBang
$cgunfold :: forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c HsSrcBang
gfoldl :: forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; HsSrcBang -&gt; c HsSrcBang
$cgfoldl :: forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; HsSrcBang -&gt; c HsSrcBang
</span><a href="../../base/src/Data.Data.html#Data"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Data.Data</span></a></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span>
</span><span id="line-680"></span><span>
</span><span id="line-681"></span><span class="hs-comment">-- | Haskell Implementation Bang</span><span>
</span><span id="line-682"></span><span class="hs-comment">--</span><span>
</span><span id="line-683"></span><span class="hs-comment">-- Bangs of data constructor arguments as generated by the compiler</span><span>
</span><span id="line-684"></span><span class="hs-comment">-- after consulting HsSrcBang, flags, etc.</span><span>
</span><span id="line-685"></span><span class="hs-keyword">data</span><span> </span><span id="HsImplBang"><span class="annot"><a href="GHC.Core.DataCon.html#HsImplBang"><span class="hs-identifier hs-var">HsImplBang</span></a></span></span><span>
</span><span id="line-686"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="HsLazy"><span class="annot"><a href="GHC.Core.DataCon.html#HsLazy"><span class="hs-identifier hs-var">HsLazy</span></a></span></span><span>    </span><span class="hs-comment">-- ^ Lazy field, or one with an unlifted type</span><span>
</span><span id="line-687"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="HsStrict"><span class="annot"><a href="GHC.Core.DataCon.html#HsStrict"><span class="hs-identifier hs-var">HsStrict</span></a></span></span><span>  </span><span class="hs-comment">-- ^ Strict but not unpacked field</span><span>
</span><span id="line-688"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="HsUnpack"><span class="annot"><a href="GHC.Core.DataCon.html#HsUnpack"><span class="hs-identifier hs-var">HsUnpack</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Coercion"><span class="hs-identifier hs-type">Coercion</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-689"></span><span>    </span><span class="hs-comment">-- ^ Strict and unpacked field</span><span>
</span><span id="line-690"></span><span>    </span><span class="hs-comment">-- co :: arg-ty ~ product-ty HsBang</span><span>
</span><span id="line-691"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span id="local-6989586621680822996"><span id="local-6989586621680822998"><span id="local-6989586621680823000"><span id="local-6989586621680823002"><span id="local-6989586621680823004"><span id="local-6989586621680823006"><span id="local-6989586621680823008"><span id="local-6989586621680823010"><span id="local-6989586621680823012"><span id="local-6989586621680823014"><span id="local-6989586621680823016"><span id="local-6989586621680823018"><span id="local-6989586621680823022"><span id="local-6989586621680823027"><span class="annot"><span class="annottext">Typeable HsImplBang
Typeable HsImplBang
-&gt; (forall (c :: * -&gt; *).
    (forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
    -&gt; (forall g. g -&gt; c g) -&gt; HsImplBang -&gt; c HsImplBang)
-&gt; (forall (c :: * -&gt; *).
    (forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
    -&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c HsImplBang)
-&gt; (HsImplBang -&gt; Constr)
-&gt; (HsImplBang -&gt; DataType)
-&gt; (forall (t :: * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d. Data d =&gt; c (t d)) -&gt; Maybe (c HsImplBang))
-&gt; (forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d e. (Data d, Data e) =&gt; c (t d e))
    -&gt; Maybe (c HsImplBang))
-&gt; ((forall b. Data b =&gt; b -&gt; b) -&gt; HsImplBang -&gt; HsImplBang)
-&gt; (forall r r'.
    (r -&gt; r' -&gt; r)
    -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsImplBang -&gt; r)
-&gt; (forall r r'.
    (r' -&gt; r -&gt; r)
    -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsImplBang -&gt; r)
-&gt; (forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; HsImplBang -&gt; [u])
-&gt; (forall u.
    Arity -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; HsImplBang -&gt; u)
-&gt; (forall (m :: * -&gt; *).
    Monad m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; HsImplBang -&gt; m HsImplBang)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; HsImplBang -&gt; m HsImplBang)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; HsImplBang -&gt; m HsImplBang)
-&gt; Data HsImplBang
HsImplBang -&gt; DataType
HsImplBang -&gt; Constr
(forall b. Data b =&gt; b -&gt; b) -&gt; HsImplBang -&gt; HsImplBang
forall a.
Typeable a
-&gt; (forall (c :: * -&gt; *).
    (forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
    -&gt; (forall g. g -&gt; c g) -&gt; a -&gt; c a)
-&gt; (forall (c :: * -&gt; *).
    (forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
    -&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c a)
-&gt; (a -&gt; Constr)
-&gt; (a -&gt; DataType)
-&gt; (forall (t :: * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d. Data d =&gt; c (t d)) -&gt; Maybe (c a))
-&gt; (forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d e. (Data d, Data e) =&gt; c (t d e)) -&gt; Maybe (c a))
-&gt; ((forall b. Data b =&gt; b -&gt; b) -&gt; a -&gt; a)
-&gt; (forall r r'.
    (r -&gt; r' -&gt; r) -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; a -&gt; r)
-&gt; (forall r r'.
    (r' -&gt; r -&gt; r) -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; a -&gt; r)
-&gt; (forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; a -&gt; [u])
-&gt; (forall u. Arity -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; a -&gt; u)
-&gt; (forall (m :: * -&gt; *).
    Monad m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; Data a
forall u. Arity -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; HsImplBang -&gt; u
forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; HsImplBang -&gt; [u]
forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsImplBang -&gt; r
forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsImplBang -&gt; r
forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; HsImplBang -&gt; m HsImplBang
forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; HsImplBang -&gt; m HsImplBang
forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c HsImplBang
forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; HsImplBang -&gt; c HsImplBang
forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c HsImplBang)
forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e)) -&gt; Maybe (c HsImplBang)
gmapMo :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; HsImplBang -&gt; m HsImplBang
$cgmapMo :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; HsImplBang -&gt; m HsImplBang
gmapMp :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; HsImplBang -&gt; m HsImplBang
$cgmapMp :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; HsImplBang -&gt; m HsImplBang
gmapM :: forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; HsImplBang -&gt; m HsImplBang
$cgmapM :: forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; HsImplBang -&gt; m HsImplBang
gmapQi :: forall u. Arity -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; HsImplBang -&gt; u
$cgmapQi :: forall u. Arity -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; HsImplBang -&gt; u
gmapQ :: forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; HsImplBang -&gt; [u]
$cgmapQ :: forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; HsImplBang -&gt; [u]
gmapQr :: forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsImplBang -&gt; r
$cgmapQr :: forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsImplBang -&gt; r
gmapQl :: forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsImplBang -&gt; r
$cgmapQl :: forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; HsImplBang -&gt; r
gmapT :: (forall b. Data b =&gt; b -&gt; b) -&gt; HsImplBang -&gt; HsImplBang
$cgmapT :: (forall b. Data b =&gt; b -&gt; b) -&gt; HsImplBang -&gt; HsImplBang
dataCast2 :: forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e)) -&gt; Maybe (c HsImplBang)
$cdataCast2 :: forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e)) -&gt; Maybe (c HsImplBang)
dataCast1 :: forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c HsImplBang)
$cdataCast1 :: forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c HsImplBang)
dataTypeOf :: HsImplBang -&gt; DataType
$cdataTypeOf :: HsImplBang -&gt; DataType
toConstr :: HsImplBang -&gt; Constr
$ctoConstr :: HsImplBang -&gt; Constr
gunfold :: forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c HsImplBang
$cgunfold :: forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c HsImplBang
gfoldl :: forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; HsImplBang -&gt; c HsImplBang
$cgfoldl :: forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; HsImplBang -&gt; c HsImplBang
</span><a href="../../base/src/Data.Data.html#Data"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Data.Data</span></a></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span>
</span><span id="line-692"></span><span>
</span><span id="line-693"></span><span class="hs-comment">-- | Source Strictness</span><span>
</span><span id="line-694"></span><span class="hs-comment">--</span><span>
</span><span id="line-695"></span><span class="hs-comment">-- What strictness annotation the user wrote</span><span>
</span><span id="line-696"></span><span class="hs-keyword">data</span><span> </span><span id="SrcStrictness"><span class="annot"><a href="GHC.Core.DataCon.html#SrcStrictness"><span class="hs-identifier hs-var">SrcStrictness</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="SrcLazy"><span class="annot"><a href="GHC.Core.DataCon.html#SrcLazy"><span class="hs-identifier hs-var">SrcLazy</span></a></span></span><span> </span><span class="hs-comment">-- ^ Lazy, ie '~'</span><span>
</span><span id="line-697"></span><span>                   </span><span class="hs-glyph">|</span><span> </span><span id="SrcStrict"><span class="annot"><a href="GHC.Core.DataCon.html#SrcStrict"><span class="hs-identifier hs-var">SrcStrict</span></a></span></span><span> </span><span class="hs-comment">-- ^ Strict, ie '!'</span><span>
</span><span id="line-698"></span><span>                   </span><span class="hs-glyph">|</span><span> </span><span id="NoSrcStrict"><span class="annot"><a href="GHC.Core.DataCon.html#NoSrcStrict"><span class="hs-identifier hs-var">NoSrcStrict</span></a></span></span><span> </span><span class="hs-comment">-- ^ no strictness annotation</span><span>
</span><span id="line-699"></span><span>     </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680822988"><span id="local-6989586621680822990"><span class="annot"><span class="annottext">SrcStrictness -&gt; SrcStrictness -&gt; Bool
(SrcStrictness -&gt; SrcStrictness -&gt; Bool)
-&gt; (SrcStrictness -&gt; SrcStrictness -&gt; Bool) -&gt; Eq SrcStrictness
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: SrcStrictness -&gt; SrcStrictness -&gt; Bool
$c/= :: SrcStrictness -&gt; SrcStrictness -&gt; Bool
== :: SrcStrictness -&gt; SrcStrictness -&gt; Bool
$c== :: SrcStrictness -&gt; SrcStrictness -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680822957"><span id="local-6989586621680822959"><span id="local-6989586621680822961"><span id="local-6989586621680822963"><span id="local-6989586621680822965"><span id="local-6989586621680822967"><span id="local-6989586621680822969"><span id="local-6989586621680822971"><span id="local-6989586621680822973"><span id="local-6989586621680822975"><span id="local-6989586621680822977"><span id="local-6989586621680822979"><span id="local-6989586621680822981"><span id="local-6989586621680822983"><span class="annot"><span class="annottext">Typeable SrcStrictness
Typeable SrcStrictness
-&gt; (forall (c :: * -&gt; *).
    (forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
    -&gt; (forall g. g -&gt; c g) -&gt; SrcStrictness -&gt; c SrcStrictness)
-&gt; (forall (c :: * -&gt; *).
    (forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
    -&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c SrcStrictness)
-&gt; (SrcStrictness -&gt; Constr)
-&gt; (SrcStrictness -&gt; DataType)
-&gt; (forall (t :: * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d. Data d =&gt; c (t d)) -&gt; Maybe (c SrcStrictness))
-&gt; (forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d e. (Data d, Data e) =&gt; c (t d e))
    -&gt; Maybe (c SrcStrictness))
-&gt; ((forall b. Data b =&gt; b -&gt; b) -&gt; SrcStrictness -&gt; SrcStrictness)
-&gt; (forall r r'.
    (r -&gt; r' -&gt; r)
    -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; SrcStrictness -&gt; r)
-&gt; (forall r r'.
    (r' -&gt; r -&gt; r)
    -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; SrcStrictness -&gt; r)
-&gt; (forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; SrcStrictness -&gt; [u])
-&gt; (forall u.
    Arity -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; SrcStrictness -&gt; u)
-&gt; (forall (m :: * -&gt; *).
    Monad m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; SrcStrictness -&gt; m SrcStrictness)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; SrcStrictness -&gt; m SrcStrictness)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; SrcStrictness -&gt; m SrcStrictness)
-&gt; Data SrcStrictness
SrcStrictness -&gt; DataType
SrcStrictness -&gt; Constr
(forall b. Data b =&gt; b -&gt; b) -&gt; SrcStrictness -&gt; SrcStrictness
forall a.
Typeable a
-&gt; (forall (c :: * -&gt; *).
    (forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
    -&gt; (forall g. g -&gt; c g) -&gt; a -&gt; c a)
-&gt; (forall (c :: * -&gt; *).
    (forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
    -&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c a)
-&gt; (a -&gt; Constr)
-&gt; (a -&gt; DataType)
-&gt; (forall (t :: * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d. Data d =&gt; c (t d)) -&gt; Maybe (c a))
-&gt; (forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d e. (Data d, Data e) =&gt; c (t d e)) -&gt; Maybe (c a))
-&gt; ((forall b. Data b =&gt; b -&gt; b) -&gt; a -&gt; a)
-&gt; (forall r r'.
    (r -&gt; r' -&gt; r) -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; a -&gt; r)
-&gt; (forall r r'.
    (r' -&gt; r -&gt; r) -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; a -&gt; r)
-&gt; (forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; a -&gt; [u])
-&gt; (forall u. Arity -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; a -&gt; u)
-&gt; (forall (m :: * -&gt; *).
    Monad m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; Data a
forall u.
Arity -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; SrcStrictness -&gt; u
forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; SrcStrictness -&gt; [u]
forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; SrcStrictness -&gt; r
forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; SrcStrictness -&gt; r
forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; SrcStrictness -&gt; m SrcStrictness
forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; SrcStrictness -&gt; m SrcStrictness
forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c SrcStrictness
forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; SrcStrictness -&gt; c SrcStrictness
forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c SrcStrictness)
forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e))
-&gt; Maybe (c SrcStrictness)
gmapMo :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; SrcStrictness -&gt; m SrcStrictness
$cgmapMo :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; SrcStrictness -&gt; m SrcStrictness
gmapMp :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; SrcStrictness -&gt; m SrcStrictness
$cgmapMp :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; SrcStrictness -&gt; m SrcStrictness
gmapM :: forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; SrcStrictness -&gt; m SrcStrictness
$cgmapM :: forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d) -&gt; SrcStrictness -&gt; m SrcStrictness
gmapQi :: forall u.
Arity -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; SrcStrictness -&gt; u
$cgmapQi :: forall u.
Arity -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; SrcStrictness -&gt; u
gmapQ :: forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; SrcStrictness -&gt; [u]
$cgmapQ :: forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; SrcStrictness -&gt; [u]
gmapQr :: forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; SrcStrictness -&gt; r
$cgmapQr :: forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; SrcStrictness -&gt; r
gmapQl :: forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; SrcStrictness -&gt; r
$cgmapQl :: forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; SrcStrictness -&gt; r
gmapT :: (forall b. Data b =&gt; b -&gt; b) -&gt; SrcStrictness -&gt; SrcStrictness
$cgmapT :: (forall b. Data b =&gt; b -&gt; b) -&gt; SrcStrictness -&gt; SrcStrictness
dataCast2 :: forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e))
-&gt; Maybe (c SrcStrictness)
$cdataCast2 :: forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e))
-&gt; Maybe (c SrcStrictness)
dataCast1 :: forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c SrcStrictness)
$cdataCast1 :: forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c SrcStrictness)
dataTypeOf :: SrcStrictness -&gt; DataType
$cdataTypeOf :: SrcStrictness -&gt; DataType
toConstr :: SrcStrictness -&gt; Constr
$ctoConstr :: SrcStrictness -&gt; Constr
gunfold :: forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c SrcStrictness
$cgunfold :: forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c SrcStrictness
gfoldl :: forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; SrcStrictness -&gt; c SrcStrictness
$cgfoldl :: forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; SrcStrictness -&gt; c SrcStrictness
</span><a href="../../base/src/Data.Data.html#Data"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Data.Data</span></a></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-700"></span><span>
</span><span id="line-701"></span><span class="hs-comment">-- | Source Unpackedness</span><span>
</span><span id="line-702"></span><span class="hs-comment">--</span><span>
</span><span id="line-703"></span><span class="hs-comment">-- What unpackedness the user requested</span><span>
</span><span id="line-704"></span><span class="hs-keyword">data</span><span> </span><span id="SrcUnpackedness"><span class="annot"><a href="GHC.Core.DataCon.html#SrcUnpackedness"><span class="hs-identifier hs-var">SrcUnpackedness</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="SrcUnpack"><span class="annot"><a href="GHC.Core.DataCon.html#SrcUnpack"><span class="hs-identifier hs-var">SrcUnpack</span></a></span></span><span> </span><span class="hs-comment">-- ^ {-# UNPACK #-} specified</span><span>
</span><span id="line-705"></span><span>                     </span><span class="hs-glyph">|</span><span> </span><span id="SrcNoUnpack"><span class="annot"><a href="GHC.Core.DataCon.html#SrcNoUnpack"><span class="hs-identifier hs-var">SrcNoUnpack</span></a></span></span><span> </span><span class="hs-comment">-- ^ {-# NOUNPACK #-} specified</span><span>
</span><span id="line-706"></span><span>                     </span><span class="hs-glyph">|</span><span> </span><span id="NoSrcUnpack"><span class="annot"><a href="GHC.Core.DataCon.html#NoSrcUnpack"><span class="hs-identifier hs-var">NoSrcUnpack</span></a></span></span><span> </span><span class="hs-comment">-- ^ no unpack pragma</span><span>
</span><span id="line-707"></span><span>     </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680822950"><span id="local-6989586621680822952"><span class="annot"><span class="annottext">SrcUnpackedness -&gt; SrcUnpackedness -&gt; Bool
(SrcUnpackedness -&gt; SrcUnpackedness -&gt; Bool)
-&gt; (SrcUnpackedness -&gt; SrcUnpackedness -&gt; Bool)
-&gt; Eq SrcUnpackedness
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: SrcUnpackedness -&gt; SrcUnpackedness -&gt; Bool
$c/= :: SrcUnpackedness -&gt; SrcUnpackedness -&gt; Bool
== :: SrcUnpackedness -&gt; SrcUnpackedness -&gt; Bool
$c== :: SrcUnpackedness -&gt; SrcUnpackedness -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680822920"><span id="local-6989586621680822922"><span id="local-6989586621680822924"><span id="local-6989586621680822926"><span id="local-6989586621680822928"><span id="local-6989586621680822930"><span id="local-6989586621680822932"><span id="local-6989586621680822934"><span id="local-6989586621680822936"><span id="local-6989586621680822938"><span id="local-6989586621680822940"><span id="local-6989586621680822942"><span id="local-6989586621680822944"><span id="local-6989586621680822946"><span class="annot"><span class="annottext">Typeable SrcUnpackedness
Typeable SrcUnpackedness
-&gt; (forall (c :: * -&gt; *).
    (forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
    -&gt; (forall g. g -&gt; c g) -&gt; SrcUnpackedness -&gt; c SrcUnpackedness)
-&gt; (forall (c :: * -&gt; *).
    (forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
    -&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c SrcUnpackedness)
-&gt; (SrcUnpackedness -&gt; Constr)
-&gt; (SrcUnpackedness -&gt; DataType)
-&gt; (forall (t :: * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d. Data d =&gt; c (t d)) -&gt; Maybe (c SrcUnpackedness))
-&gt; (forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d e. (Data d, Data e) =&gt; c (t d e))
    -&gt; Maybe (c SrcUnpackedness))
-&gt; ((forall b. Data b =&gt; b -&gt; b)
    -&gt; SrcUnpackedness -&gt; SrcUnpackedness)
-&gt; (forall r r'.
    (r -&gt; r' -&gt; r)
    -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; SrcUnpackedness -&gt; r)
-&gt; (forall r r'.
    (r' -&gt; r -&gt; r)
    -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; SrcUnpackedness -&gt; r)
-&gt; (forall u.
    (forall d. Data d =&gt; d -&gt; u) -&gt; SrcUnpackedness -&gt; [u])
-&gt; (forall u.
    Arity -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; SrcUnpackedness -&gt; u)
-&gt; (forall (m :: * -&gt; *).
    Monad m =&gt;
    (forall d. Data d =&gt; d -&gt; m d)
    -&gt; SrcUnpackedness -&gt; m SrcUnpackedness)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d)
    -&gt; SrcUnpackedness -&gt; m SrcUnpackedness)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d)
    -&gt; SrcUnpackedness -&gt; m SrcUnpackedness)
-&gt; Data SrcUnpackedness
SrcUnpackedness -&gt; DataType
SrcUnpackedness -&gt; Constr
(forall b. Data b =&gt; b -&gt; b) -&gt; SrcUnpackedness -&gt; SrcUnpackedness
forall a.
Typeable a
-&gt; (forall (c :: * -&gt; *).
    (forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
    -&gt; (forall g. g -&gt; c g) -&gt; a -&gt; c a)
-&gt; (forall (c :: * -&gt; *).
    (forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
    -&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c a)
-&gt; (a -&gt; Constr)
-&gt; (a -&gt; DataType)
-&gt; (forall (t :: * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d. Data d =&gt; c (t d)) -&gt; Maybe (c a))
-&gt; (forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d e. (Data d, Data e) =&gt; c (t d e)) -&gt; Maybe (c a))
-&gt; ((forall b. Data b =&gt; b -&gt; b) -&gt; a -&gt; a)
-&gt; (forall r r'.
    (r -&gt; r' -&gt; r) -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; a -&gt; r)
-&gt; (forall r r'.
    (r' -&gt; r -&gt; r) -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; a -&gt; r)
-&gt; (forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; a -&gt; [u])
-&gt; (forall u. Arity -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; a -&gt; u)
-&gt; (forall (m :: * -&gt; *).
    Monad m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; Data a
forall u.
Arity -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; SrcUnpackedness -&gt; u
forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; SrcUnpackedness -&gt; [u]
forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; SrcUnpackedness -&gt; r
forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; SrcUnpackedness -&gt; r
forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; SrcUnpackedness -&gt; m SrcUnpackedness
forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; SrcUnpackedness -&gt; m SrcUnpackedness
forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c SrcUnpackedness
forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; SrcUnpackedness -&gt; c SrcUnpackedness
forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c SrcUnpackedness)
forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e))
-&gt; Maybe (c SrcUnpackedness)
gmapMo :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; SrcUnpackedness -&gt; m SrcUnpackedness
$cgmapMo :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; SrcUnpackedness -&gt; m SrcUnpackedness
gmapMp :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; SrcUnpackedness -&gt; m SrcUnpackedness
$cgmapMp :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; SrcUnpackedness -&gt; m SrcUnpackedness
gmapM :: forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; SrcUnpackedness -&gt; m SrcUnpackedness
$cgmapM :: forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; SrcUnpackedness -&gt; m SrcUnpackedness
gmapQi :: forall u.
Arity -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; SrcUnpackedness -&gt; u
$cgmapQi :: forall u.
Arity -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; SrcUnpackedness -&gt; u
gmapQ :: forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; SrcUnpackedness -&gt; [u]
$cgmapQ :: forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; SrcUnpackedness -&gt; [u]
gmapQr :: forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; SrcUnpackedness -&gt; r
$cgmapQr :: forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; SrcUnpackedness -&gt; r
gmapQl :: forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; SrcUnpackedness -&gt; r
$cgmapQl :: forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; SrcUnpackedness -&gt; r
gmapT :: (forall b. Data b =&gt; b -&gt; b) -&gt; SrcUnpackedness -&gt; SrcUnpackedness
$cgmapT :: (forall b. Data b =&gt; b -&gt; b) -&gt; SrcUnpackedness -&gt; SrcUnpackedness
dataCast2 :: forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e))
-&gt; Maybe (c SrcUnpackedness)
$cdataCast2 :: forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e))
-&gt; Maybe (c SrcUnpackedness)
dataCast1 :: forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c SrcUnpackedness)
$cdataCast1 :: forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c SrcUnpackedness)
dataTypeOf :: SrcUnpackedness -&gt; DataType
$cdataTypeOf :: SrcUnpackedness -&gt; DataType
toConstr :: SrcUnpackedness -&gt; Constr
$ctoConstr :: SrcUnpackedness -&gt; Constr
gunfold :: forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c SrcUnpackedness
$cgunfold :: forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c SrcUnpackedness
gfoldl :: forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; SrcUnpackedness -&gt; c SrcUnpackedness
$cgfoldl :: forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; SrcUnpackedness -&gt; c SrcUnpackedness
</span><a href="../../base/src/Data.Data.html#Data"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Data.Data</span></a></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-708"></span><span>
</span><span id="line-709"></span><span>
</span><span id="line-710"></span><span>
</span><span id="line-711"></span><span class="hs-comment">-------------------------</span><span>
</span><span id="line-712"></span><span class="hs-comment">-- StrictnessMark is internal only, used to indicate strictness</span><span>
</span><span id="line-713"></span><span class="hs-comment">-- of the DataCon *worker* fields</span><span>
</span><span id="line-714"></span><span class="hs-keyword">data</span><span> </span><span id="StrictnessMark"><span class="annot"><a href="GHC.Core.DataCon.html#StrictnessMark"><span class="hs-identifier hs-var">StrictnessMark</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="MarkedStrict"><span class="annot"><a href="GHC.Core.DataCon.html#MarkedStrict"><span class="hs-identifier hs-var">MarkedStrict</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="NotMarkedStrict"><span class="annot"><a href="GHC.Core.DataCon.html#NotMarkedStrict"><span class="hs-identifier hs-var">NotMarkedStrict</span></a></span></span><span>
</span><span id="line-715"></span><span>
</span><span id="line-716"></span><span class="hs-comment">-- | An 'EqSpec' is a tyvar/type pair representing an equality made in</span><span>
</span><span id="line-717"></span><span class="hs-comment">-- rejigging a GADT constructor</span><span>
</span><span id="line-718"></span><span class="hs-keyword">data</span><span> </span><span id="EqSpec"><span class="annot"><a href="GHC.Core.DataCon.html#EqSpec"><span class="hs-identifier hs-var">EqSpec</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="EqSpec"><span class="annot"><a href="GHC.Core.DataCon.html#EqSpec"><span class="hs-identifier hs-var">EqSpec</span></a></span></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#TyVar"><span class="hs-identifier hs-type">TyVar</span></a></span><span>
</span><span id="line-719"></span><span>                     </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span>
</span><span id="line-720"></span><span>
</span><span id="line-721"></span><span class="hs-comment">-- | Make a non-dependent 'EqSpec'</span><span>
</span><span id="line-722"></span><span class="annot"><a href="GHC.Core.DataCon.html#mkEqSpec"><span class="hs-identifier hs-type">mkEqSpec</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#TyVar"><span class="hs-identifier hs-type">TyVar</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#EqSpec"><span class="hs-identifier hs-type">EqSpec</span></a></span><span>
</span><span id="line-723"></span><span id="mkEqSpec"><span class="annot"><span class="annottext">mkEqSpec :: TyVar -&gt; Type -&gt; EqSpec
</span><a href="GHC.Core.DataCon.html#mkEqSpec"><span class="hs-identifier hs-var hs-var">mkEqSpec</span></a></span></span><span> </span><span id="local-6989586621680822916"><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822916"><span class="hs-identifier hs-var">tv</span></a></span></span><span> </span><span id="local-6989586621680822915"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822915"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyVar -&gt; Type -&gt; EqSpec
</span><a href="GHC.Core.DataCon.html#EqSpec"><span class="hs-identifier hs-var">EqSpec</span></a></span><span> </span><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822916"><span class="hs-identifier hs-var">tv</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822915"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-724"></span><span>
</span><span id="line-725"></span><span class="annot"><a href="GHC.Core.DataCon.html#eqSpecTyVar"><span class="hs-identifier hs-type">eqSpecTyVar</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#EqSpec"><span class="hs-identifier hs-type">EqSpec</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#TyVar"><span class="hs-identifier hs-type">TyVar</span></a></span><span>
</span><span id="line-726"></span><span id="eqSpecTyVar"><span class="annot"><span class="annottext">eqSpecTyVar :: EqSpec -&gt; TyVar
</span><a href="GHC.Core.DataCon.html#eqSpecTyVar"><span class="hs-identifier hs-var hs-var">eqSpecTyVar</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#EqSpec"><span class="hs-identifier hs-type">EqSpec</span></a></span><span> </span><span id="local-6989586621680822914"><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822914"><span class="hs-identifier hs-var">tv</span></a></span></span><span> </span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822914"><span class="hs-identifier hs-var">tv</span></a></span><span>
</span><span id="line-727"></span><span>
</span><span id="line-728"></span><span class="annot"><a href="GHC.Core.DataCon.html#eqSpecType"><span class="hs-identifier hs-type">eqSpecType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#EqSpec"><span class="hs-identifier hs-type">EqSpec</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span>
</span><span id="line-729"></span><span id="eqSpecType"><span class="annot"><span class="annottext">eqSpecType :: EqSpec -&gt; Type
</span><a href="GHC.Core.DataCon.html#eqSpecType"><span class="hs-identifier hs-var hs-var">eqSpecType</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#EqSpec"><span class="hs-identifier hs-type">EqSpec</span></a></span><span> </span><span class="annot"><span class="annottext">TyVar
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680822913"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822913"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822913"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-730"></span><span>
</span><span id="line-731"></span><span class="annot"><a href="GHC.Core.DataCon.html#eqSpecPair"><span class="hs-identifier hs-type">eqSpecPair</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#EqSpec"><span class="hs-identifier hs-type">EqSpec</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.html#TyVar"><span class="hs-identifier hs-type">TyVar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-732"></span><span id="eqSpecPair"><span class="annot"><span class="annottext">eqSpecPair :: EqSpec -&gt; (TyVar, Type)
</span><a href="GHC.Core.DataCon.html#eqSpecPair"><span class="hs-identifier hs-var hs-var">eqSpecPair</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#EqSpec"><span class="hs-identifier hs-type">EqSpec</span></a></span><span> </span><span id="local-6989586621680822912"><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822912"><span class="hs-identifier hs-var">tv</span></a></span></span><span> </span><span id="local-6989586621680822911"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822911"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822912"><span class="hs-identifier hs-var">tv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822911"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-733"></span><span>
</span><span id="line-734"></span><span class="annot"><a href="GHC.Core.DataCon.html#eqSpecPreds"><span class="hs-identifier hs-type">eqSpecPreds</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.DataCon.html#EqSpec"><span class="hs-identifier hs-type">EqSpec</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#ThetaType"><span class="hs-identifier hs-type">ThetaType</span></a></span><span>
</span><span id="line-735"></span><span id="eqSpecPreds"><span class="annot"><span class="annottext">eqSpecPreds :: [EqSpec] -&gt; [Type]
</span><a href="GHC.Core.DataCon.html#eqSpecPreds"><span class="hs-identifier hs-var hs-var">eqSpecPreds</span></a></span></span><span> </span><span id="local-6989586621680822910"><span class="annot"><span class="annottext">[EqSpec]
</span><a href="#local-6989586621680822910"><span class="hs-identifier hs-var">spec</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Type -&gt; Type -&gt; Type
</span><a href="GHC.Core.Coercion.html#mkPrimEqPred"><span class="hs-identifier hs-var">mkPrimEqPred</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyVar -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#mkTyVarTy"><span class="hs-identifier hs-var">mkTyVarTy</span></a></span><span> </span><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822907"><span class="hs-identifier hs-var">tv</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822906"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-736"></span><span>                   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#EqSpec"><span class="hs-identifier hs-type">EqSpec</span></a></span><span> </span><span id="local-6989586621680822907"><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822907"><span class="hs-identifier hs-var">tv</span></a></span></span><span> </span><span id="local-6989586621680822906"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822906"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[EqSpec]
</span><a href="#local-6989586621680822910"><span class="hs-identifier hs-var">spec</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-737"></span><span>
</span><span id="line-738"></span><span class="hs-comment">-- | Substitute in an 'EqSpec'. Precondition: if the LHS of the EqSpec</span><span>
</span><span id="line-739"></span><span class="hs-comment">-- is mapped in the substitution, it is mapped to a type variable, not</span><span>
</span><span id="line-740"></span><span class="hs-comment">-- a full type.</span><span>
</span><span id="line-741"></span><span class="annot"><a href="GHC.Core.DataCon.html#substEqSpec"><span class="hs-identifier hs-type">substEqSpec</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Subst.html#TCvSubst"><span class="hs-identifier hs-type">TCvSubst</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#EqSpec"><span class="hs-identifier hs-type">EqSpec</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#EqSpec"><span class="hs-identifier hs-type">EqSpec</span></a></span><span>
</span><span id="line-742"></span><span id="substEqSpec"><span class="annot"><span class="annottext">substEqSpec :: TCvSubst -&gt; EqSpec -&gt; EqSpec
</span><a href="GHC.Core.DataCon.html#substEqSpec"><span class="hs-identifier hs-var hs-var">substEqSpec</span></a></span></span><span> </span><span id="local-6989586621680822905"><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680822905"><span class="hs-identifier hs-var">subst</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#EqSpec"><span class="hs-identifier hs-type">EqSpec</span></a></span><span> </span><span id="local-6989586621680822904"><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822904"><span class="hs-identifier hs-var">tv</span></a></span></span><span> </span><span id="local-6989586621680822903"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822903"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-743"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyVar -&gt; Type -&gt; EqSpec
</span><a href="GHC.Core.DataCon.html#EqSpec"><span class="hs-identifier hs-var">EqSpec</span></a></span><span> </span><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822902"><span class="hs-identifier hs-var">tv'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HasCallStack =&gt; TCvSubst -&gt; Type -&gt; Type
TCvSubst -&gt; Type -&gt; Type
</span><a href="GHC.Core.TyCo.Subst.html#substTy"><span class="hs-identifier hs-var">substTy</span></a></span><span> </span><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680822905"><span class="hs-identifier hs-var">subst</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822903"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-744"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-745"></span><span>    </span><span id="local-6989586621680822902"><span class="annot"><span class="annottext">tv' :: TyVar
</span><a href="#local-6989586621680822902"><span class="hs-identifier hs-var hs-var">tv'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Type -&gt; TyVar
</span><a href="GHC.Core.Type.html#getTyVar"><span class="hs-identifier hs-var">getTyVar</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;substEqSpec&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TCvSubst -&gt; TyVar -&gt; Type
</span><a href="GHC.Core.TyCo.Subst.html#substTyVar"><span class="hs-identifier hs-var">substTyVar</span></a></span><span> </span><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680822905"><span class="hs-identifier hs-var">subst</span></a></span><span> </span><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822904"><span class="hs-identifier hs-var">tv</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-746"></span><span>
</span><span id="line-747"></span><span class="hs-comment">-- | Filter out any 'TyVar's mentioned in an 'EqSpec'.</span><span>
</span><span id="line-748"></span><span class="annot"><a href="GHC.Core.DataCon.html#filterEqSpec"><span class="hs-identifier hs-type">filterEqSpec</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.DataCon.html#EqSpec"><span class="hs-identifier hs-type">EqSpec</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#TyVar"><span class="hs-identifier hs-type">TyVar</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#TyVar"><span class="hs-identifier hs-type">TyVar</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-749"></span><span id="filterEqSpec"><span class="annot"><span class="annottext">filterEqSpec :: [EqSpec] -&gt; [TyVar] -&gt; [TyVar]
</span><a href="GHC.Core.DataCon.html#filterEqSpec"><span class="hs-identifier hs-var hs-var">filterEqSpec</span></a></span></span><span> </span><span id="local-6989586621680822898"><span class="annot"><span class="annottext">[EqSpec]
</span><a href="#local-6989586621680822898"><span class="hs-identifier hs-var">eq_spec</span></a></span></span><span>
</span><span id="line-750"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(TyVar -&gt; Bool) -&gt; [TyVar] -&gt; [TyVar]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="annot"><span class="annottext">TyVar -&gt; Bool
</span><a href="#local-6989586621680822897"><span class="hs-identifier hs-var">not_in_eq_spec</span></a></span><span>
</span><span id="line-751"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-752"></span><span>    </span><span id="local-6989586621680822897"><span class="annot"><span class="annottext">not_in_eq_spec :: TyVar -&gt; Bool
</span><a href="#local-6989586621680822897"><span class="hs-identifier hs-var hs-var">not_in_eq_spec</span></a></span></span><span> </span><span id="local-6989586621680822894"><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822894"><span class="hs-identifier hs-var">var</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(EqSpec -&gt; Bool) -&gt; [EqSpec] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#all"><span class="hs-identifier hs-var">all</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Bool) -&gt; (EqSpec -&gt; Bool) -&gt; EqSpec -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyVar -&gt; TyVar -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822894"><span class="hs-identifier hs-var">var</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(TyVar -&gt; Bool) -&gt; (EqSpec -&gt; TyVar) -&gt; EqSpec -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">EqSpec -&gt; TyVar
</span><a href="GHC.Core.DataCon.html#eqSpecTyVar"><span class="hs-identifier hs-var">eqSpecTyVar</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[EqSpec]
</span><a href="#local-6989586621680822898"><span class="hs-identifier hs-var">eq_spec</span></a></span><span>
</span><span id="line-753"></span><span>
</span><span id="line-754"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680822888"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#EqSpec"><span class="hs-identifier hs-type">EqSpec</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-755"></span><span>  </span><span id="local-6989586621680822884"><span class="annot"><span class="annottext">ppr :: EqSpec -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#EqSpec"><span class="hs-identifier hs-type">EqSpec</span></a></span><span> </span><span id="local-6989586621680822882"><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822882"><span class="hs-identifier hs-var">tv</span></a></span></span><span> </span><span id="local-6989586621680822881"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822881"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(TyVar, Type) -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822882"><span class="hs-identifier hs-var">tv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822881"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-756"></span><span>
</span><span id="line-757"></span><span class="hs-comment">{- Note [Data-con worker strictness]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Notice that we do *not* say the worker Id is strict even if the data
constructor is declared strict
     e.g.    data T = MkT !(Int,Int)
Why?  Because the *wrapper* $WMkT is strict (and its unfolding has case
expressions that do the evals) but the *worker* MkT itself is not. If we
pretend it is strict then when we see
     case x of y -&gt; MkT y
the simplifier thinks that y is &quot;sure to be evaluated&quot; (because the worker MkT
is strict) and drops the case.  No, the workerId MkT is not strict.

However, the worker does have StrictnessMarks.  When the simplifier sees a
pattern
     case e of MkT x -&gt; ...
it uses the dataConRepStrictness of MkT to mark x as evaluated; but that's
fine... dataConRepStrictness comes from the data con not from the worker Id.

Note [Bangs on data constructor arguments]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Consider
  data T = MkT !Int {-# UNPACK #-} !Int Bool

When compiling the module, GHC will decide how to represent
MkT, depending on the optimisation level, and settings of
flags like -funbox-small-strict-fields.

Terminology:
  * HsSrcBang:  What the user wrote
                Constructors: HsSrcBang

  * HsImplBang: What GHC decided
                Constructors: HsLazy, HsStrict, HsUnpack

* If T was defined in this module, MkT's dcSrcBangs field
  records the [HsSrcBang] of what the user wrote; in the example
    [ HsSrcBang _ NoSrcUnpack SrcStrict
    , HsSrcBang _ SrcUnpack SrcStrict
    , HsSrcBang _ NoSrcUnpack NoSrcStrictness]

* However, if T was defined in an imported module, the importing module
  must follow the decisions made in the original module, regardless of
  the flag settings in the importing module.
  Also see Note [Bangs on imported data constructors] in GHC.Types.Id.Make

* The dcr_bangs field of the dcRep field records the [HsImplBang]
  If T was defined in this module, Without -O the dcr_bangs might be
    [HsStrict, HsStrict, HsLazy]
  With -O it might be
    [HsStrict, HsUnpack _, HsLazy]
  With -funbox-small-strict-fields it might be
    [HsUnpack, HsUnpack _, HsLazy]
  With -XStrictData it might be
    [HsStrict, HsUnpack _, HsStrict]

Note [Data con representation]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The dcRepType field contains the type of the representation of a constructor
This may differ from the type of the constructor *Id* (built
by MkId.mkDataConId) for two reasons:
        a) the constructor Id may be overloaded, but the dictionary isn't stored
           e.g.    data Eq a =&gt; T a = MkT a a

        b) the constructor may store an unboxed version of a strict field.

Here's an example illustrating both:
        data Ord a =&gt; T a = MkT Int! a
Here
        T :: Ord a =&gt; Int -&gt; a -&gt; T a
but the rep type is
        Trep :: Int# -&gt; a -&gt; T a
Actually, the unboxed part isn't implemented yet!



************************************************************************
*                                                                      *
\subsection{Instances}
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-838"></span><span>
</span><span id="line-839"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Eq</span></span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-840"></span><span>    </span><span id="local-6989586621680822872"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822872"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621680822871"><span class="annot"><span class="annottext">== :: DataCon -&gt; DataCon -&gt; Bool
</span><span class="hs-operator hs-var hs-var hs-var hs-var">==</span></span></span><span> </span><span id="local-6989586621680822870"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822870"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Unique
forall a. Uniquable a =&gt; a -&gt; Unique
</span><a href="GHC.Types.Unique.html#getUnique"><span class="hs-identifier hs-var">getUnique</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822872"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; Unique -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Unique
forall a. Uniquable a =&gt; a -&gt; Unique
</span><a href="GHC.Types.Unique.html#getUnique"><span class="hs-identifier hs-var">getUnique</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822870"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-841"></span><span>    </span><span id="local-6989586621680822865"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822865"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621680822864"><span class="annot"><span class="annottext">/= :: DataCon -&gt; DataCon -&gt; Bool
</span><span class="hs-operator hs-var hs-var hs-var hs-var">/=</span></span></span><span> </span><span id="local-6989586621680822862"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822862"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Unique
forall a. Uniquable a =&gt; a -&gt; Unique
</span><a href="GHC.Types.Unique.html#getUnique"><span class="hs-identifier hs-var">getUnique</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822865"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; Unique -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Unique
forall a. Uniquable a =&gt; a -&gt; Unique
</span><a href="GHC.Types.Unique.html#getUnique"><span class="hs-identifier hs-var">getUnique</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822862"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-842"></span><span>
</span><span id="line-843"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Uniquable"><span class="hs-identifier hs-type">Uniquable</span></a></span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-844"></span><span>    </span><span id="local-6989586621680822859"><span class="annot"><span class="annottext">getUnique :: DataCon -&gt; Unique
</span><a href="#local-6989586621680822859"><span class="hs-identifier hs-var hs-var hs-var hs-var">getUnique</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Unique
</span><a href="GHC.Core.DataCon.html#dcUnique"><span class="hs-identifier hs-var hs-var">dcUnique</span></a></span><span>
</span><span id="line-845"></span><span>
</span><span id="line-846"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680822857"><span class="annot"><a href="GHC.Types.Name.html#NamedThing"><span class="hs-identifier hs-type">NamedThing</span></a></span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-847"></span><span>    </span><span id="local-6989586621680822854"><span class="annot"><span class="annottext">getName :: DataCon -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var hs-var hs-var hs-var">getName</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Name
</span><a href="GHC.Core.DataCon.html#dcName"><span class="hs-identifier hs-var hs-var">dcName</span></a></span><span>
</span><span id="line-848"></span><span>
</span><span id="line-849"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680822850"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-850"></span><span>    </span><span id="local-6989586621680822847"><span class="annot"><span class="annottext">ppr :: DataCon -&gt; SDoc
</span><a href="#local-6989586621680822847"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span id="local-6989586621680822846"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822846"><span class="hs-identifier hs-var">con</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; Name
</span><a href="GHC.Core.DataCon.html#dataConName"><span class="hs-identifier hs-var">dataConName</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822846"><span class="hs-identifier hs-var">con</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-851"></span><span>
</span><span id="line-852"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680822838"><span id="local-6989586621680822842"><span class="annot"><a href="GHC.Utils.Outputable.html#OutputableBndr"><span class="hs-identifier hs-type">OutputableBndr</span></a></span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-853"></span><span>    </span><span id="local-6989586621680822834"><span class="annot"><span class="annottext">pprInfixOcc :: DataCon -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#pprInfixOcc"><span class="hs-identifier hs-var hs-var hs-var hs-var">pprInfixOcc</span></a></span></span><span> </span><span id="local-6989586621680822832"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822832"><span class="hs-identifier hs-var">con</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; SDoc
forall a. (Outputable a, NamedThing a) =&gt; a -&gt; SDoc
</span><a href="GHC.Types.Name.html#pprInfixName"><span class="hs-identifier hs-var">pprInfixName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; Name
</span><a href="GHC.Core.DataCon.html#dataConName"><span class="hs-identifier hs-var">dataConName</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822832"><span class="hs-identifier hs-var">con</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-854"></span><span>    </span><span id="local-6989586621680822829"><span class="annot"><span class="annottext">pprPrefixOcc :: DataCon -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#pprPrefixOcc"><span class="hs-identifier hs-var hs-var hs-var hs-var">pprPrefixOcc</span></a></span></span><span> </span><span id="local-6989586621680822827"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822827"><span class="hs-identifier hs-var">con</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; SDoc
forall a. NamedThing a =&gt; a -&gt; SDoc
</span><a href="GHC.Types.Name.html#pprPrefixName"><span class="hs-identifier hs-var">pprPrefixName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; Name
</span><a href="GHC.Core.DataCon.html#dataConName"><span class="hs-identifier hs-var">dataConName</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822827"><span class="hs-identifier hs-var">con</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-855"></span><span>
</span><span id="line-856"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680822799"><span id="local-6989586621680822801"><span id="local-6989586621680822803"><span id="local-6989586621680822805"><span id="local-6989586621680822807"><span id="local-6989586621680822809"><span id="local-6989586621680822811"><span id="local-6989586621680822813"><span id="local-6989586621680822815"><span id="local-6989586621680822817"><span id="local-6989586621680822822"><span class="annot"><a href="../../base/src/Data.Data.html#Data"><span class="hs-identifier hs-type">Data.Data</span></a></span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span></span></span></span></span></span></span></span></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-857"></span><span>    </span><span class="hs-comment">-- don't traverse?</span><span>
</span><span id="line-858"></span><span>    </span><span id="local-6989586621680822798"><span class="annot"><span class="annottext">toConstr :: DataCon -&gt; Constr
</span><a href="../../base/src/Data.Data.html#toConstr"><span class="hs-identifier hs-var hs-var hs-var hs-var">toConstr</span></a></span></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Constr
</span><a href="GHC.Utils.Misc.html#abstractConstr"><span class="hs-identifier hs-var">abstractConstr</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;DataCon&quot;</span></span><span>
</span><span id="line-859"></span><span>    </span><span id="local-6989586621680822793"><span class="annot"><span class="annottext">gunfold :: forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c DataCon
</span><a href="../../base/src/Data.Data.html#gunfold"><span class="hs-identifier hs-var hs-var hs-var hs-var">gunfold</span></a></span></span><span> </span><span class="annot"><span class="annottext">forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">forall r. r -&gt; c r
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Constr -&gt; c DataCon
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;gunfold&quot;</span></span><span>
</span><span id="line-860"></span><span>    </span><span id="local-6989586621680822790"><span class="annot"><span class="annottext">dataTypeOf :: DataCon -&gt; DataType
</span><a href="../../base/src/Data.Data.html#dataTypeOf"><span class="hs-identifier hs-var hs-var hs-var hs-var">dataTypeOf</span></a></span></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; DataType
</span><a href="../../base/src/Data.Data.html#mkNoRepType"><span class="hs-identifier hs-var">mkNoRepType</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;DataCon&quot;</span></span><span>
</span><span id="line-861"></span><span>
</span><span id="line-862"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680822785"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#HsSrcBang"><span class="hs-identifier hs-type">HsSrcBang</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-863"></span><span>    </span><span id="local-6989586621680822782"><span class="annot"><span class="annottext">ppr :: HsSrcBang -&gt; SDoc
</span><a href="#local-6989586621680822782"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#HsSrcBang"><span class="hs-identifier hs-type">HsSrcBang</span></a></span><span> </span><span class="annot"><span class="annottext">SourceText
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680822781"><span class="annot"><span class="annottext">SrcUnpackedness
</span><a href="#local-6989586621680822781"><span class="hs-identifier hs-var">prag</span></a></span></span><span> </span><span id="local-6989586621680822780"><span class="annot"><span class="annottext">SrcStrictness
</span><a href="#local-6989586621680822780"><span class="hs-identifier hs-var">mark</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SrcUnpackedness -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">SrcUnpackedness
</span><a href="#local-6989586621680822781"><span class="hs-identifier hs-var">prag</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SrcStrictness -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">SrcStrictness
</span><a href="#local-6989586621680822780"><span class="hs-identifier hs-var">mark</span></a></span><span>
</span><span id="line-864"></span><span>
</span><span id="line-865"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680822776"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#HsImplBang"><span class="hs-identifier hs-type">HsImplBang</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-866"></span><span>    </span><span id="local-6989586621680822773"><span class="annot"><span class="annottext">ppr :: HsImplBang -&gt; SDoc
</span><a href="#local-6989586621680822773"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="annot"><span class="annottext">HsImplBang
</span><a href="GHC.Core.DataCon.html#HsLazy"><span class="hs-identifier hs-var">HsLazy</span></a></span><span>                  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Lazy&quot;</span></span><span>
</span><span id="line-867"></span><span>    </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#HsUnpack"><span class="hs-identifier hs-type">HsUnpack</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Coercion
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Unpacked&quot;</span></span><span>
</span><span id="line-868"></span><span>    </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#HsUnpack"><span class="hs-identifier hs-type">HsUnpack</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680822771"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680822771"><span class="hs-identifier hs-var">co</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Unpacked&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#parens"><span class="hs-identifier hs-var">parens</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Coercion -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680822771"><span class="hs-identifier hs-var">co</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-869"></span><span>    </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">HsImplBang
</span><a href="GHC.Core.DataCon.html#HsStrict"><span class="hs-identifier hs-var">HsStrict</span></a></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;StrictNotUnpacked&quot;</span></span><span>
</span><span id="line-870"></span><span>
</span><span id="line-871"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680822766"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#SrcStrictness"><span class="hs-identifier hs-type">SrcStrictness</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-872"></span><span>    </span><span id="local-6989586621680822765"><span class="annot"><span class="annottext">ppr :: SrcStrictness -&gt; SDoc
</span><a href="#local-6989586621680822765"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="annot"><span class="annottext">SrcStrictness
</span><a href="GHC.Core.DataCon.html#SrcLazy"><span class="hs-identifier hs-var">SrcLazy</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'~'</span></span><span>
</span><span id="line-873"></span><span>    </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">SrcStrictness
</span><a href="GHC.Core.DataCon.html#SrcStrict"><span class="hs-identifier hs-var">SrcStrict</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'!'</span></span><span>
</span><span id="line-874"></span><span>    </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">SrcStrictness
</span><a href="GHC.Core.DataCon.html#NoSrcStrict"><span class="hs-identifier hs-var">NoSrcStrict</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span>
</span><span id="line-875"></span><span>
</span><span id="line-876"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680822760"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#SrcUnpackedness"><span class="hs-identifier hs-type">SrcUnpackedness</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-877"></span><span>    </span><span id="local-6989586621680822759"><span class="annot"><span class="annottext">ppr :: SrcUnpackedness -&gt; SDoc
</span><a href="#local-6989586621680822759"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="annot"><span class="annottext">SrcUnpackedness
</span><a href="GHC.Core.DataCon.html#SrcUnpack"><span class="hs-identifier hs-var">SrcUnpack</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;{-# UNPACK #-}&quot;</span></span><span>
</span><span id="line-878"></span><span>    </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">SrcUnpackedness
</span><a href="GHC.Core.DataCon.html#SrcNoUnpack"><span class="hs-identifier hs-var">SrcNoUnpack</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;{-# NOUNPACK #-}&quot;</span></span><span>
</span><span id="line-879"></span><span>    </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">SrcUnpackedness
</span><a href="GHC.Core.DataCon.html#NoSrcUnpack"><span class="hs-identifier hs-var">NoSrcUnpack</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span>
</span><span id="line-880"></span><span>
</span><span id="line-881"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680822756"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#StrictnessMark"><span class="hs-identifier hs-type">StrictnessMark</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-882"></span><span>    </span><span id="local-6989586621680822755"><span class="annot"><span class="annottext">ppr :: StrictnessMark -&gt; SDoc
</span><a href="#local-6989586621680822755"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="annot"><span class="annottext">StrictnessMark
</span><a href="GHC.Core.DataCon.html#MarkedStrict"><span class="hs-identifier hs-var">MarkedStrict</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;!&quot;</span></span><span>
</span><span id="line-883"></span><span>    </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">StrictnessMark
</span><a href="GHC.Core.DataCon.html#NotMarkedStrict"><span class="hs-identifier hs-var">NotMarkedStrict</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span>
</span><span id="line-884"></span><span>
</span><span id="line-885"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680822752"><span class="annot"><a href="GHC.Utils.Binary.html#Binary"><span class="hs-identifier hs-type">Binary</span></a></span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#SrcStrictness"><span class="hs-identifier hs-type">SrcStrictness</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-886"></span><span>    </span><span id="local-6989586621680822745"><span class="annot"><span class="annottext">put_ :: BinHandle -&gt; SrcStrictness -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var hs-var hs-var hs-var">put_</span></a></span></span><span> </span><span id="local-6989586621680822743"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680822743"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span class="annot"><span class="annottext">SrcStrictness
</span><a href="GHC.Core.DataCon.html#SrcLazy"><span class="hs-identifier hs-var">SrcLazy</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; Word8 -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#putByte"><span class="hs-identifier hs-var">putByte</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680822743"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0</span></span><span>
</span><span id="line-887"></span><span>    </span><span class="annot"><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span id="local-6989586621680822741"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680822741"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span class="annot"><span class="annottext">SrcStrictness
</span><a href="GHC.Core.DataCon.html#SrcStrict"><span class="hs-identifier hs-var">SrcStrict</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; Word8 -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#putByte"><span class="hs-identifier hs-var">putByte</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680822741"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">1</span></span><span>
</span><span id="line-888"></span><span>    </span><span class="annot"><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span id="local-6989586621680822740"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680822740"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span class="annot"><span class="annottext">SrcStrictness
</span><a href="GHC.Core.DataCon.html#NoSrcStrict"><span class="hs-identifier hs-var">NoSrcStrict</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; Word8 -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#putByte"><span class="hs-identifier hs-var">putByte</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680822740"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">2</span></span><span>
</span><span id="line-889"></span><span>
</span><span id="line-890"></span><span>    </span><span id="local-6989586621680822729"><span class="annot"><span class="annottext">get :: BinHandle -&gt; IO SrcStrictness
</span><a href="GHC.Utils.Binary.html#get"><span class="hs-identifier hs-var hs-var hs-var hs-var">get</span></a></span></span><span> </span><span id="local-6989586621680822727"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680822727"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-891"></span><span>      </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621680822726"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621680822726"><span class="hs-identifier hs-var">h</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; IO Word8
</span><a href="GHC.Utils.Binary.html#getByte"><span class="hs-identifier hs-var">getByte</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680822727"><span class="hs-identifier hs-var">bh</span></a></span><span>
</span><span id="line-892"></span><span>         </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621680822726"><span class="hs-identifier hs-var">h</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-893"></span><span>           </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SrcStrictness -&gt; IO SrcStrictness
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">SrcStrictness
</span><a href="GHC.Core.DataCon.html#SrcLazy"><span class="hs-identifier hs-var">SrcLazy</span></a></span><span>
</span><span id="line-894"></span><span>           </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">1</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SrcStrictness -&gt; IO SrcStrictness
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">SrcStrictness
</span><a href="GHC.Core.DataCon.html#SrcStrict"><span class="hs-identifier hs-var">SrcStrict</span></a></span><span>
</span><span id="line-895"></span><span>           </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SrcStrictness -&gt; IO SrcStrictness
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">SrcStrictness
</span><a href="GHC.Core.DataCon.html#NoSrcStrict"><span class="hs-identifier hs-var">NoSrcStrict</span></a></span><span>
</span><span id="line-896"></span><span>
</span><span id="line-897"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680822722"><span class="annot"><a href="GHC.Utils.Binary.html#Binary"><span class="hs-identifier hs-type">Binary</span></a></span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#SrcUnpackedness"><span class="hs-identifier hs-type">SrcUnpackedness</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-898"></span><span>    </span><span id="local-6989586621680822717"><span class="annot"><span class="annottext">put_ :: BinHandle -&gt; SrcUnpackedness -&gt; IO ()
</span><a href="#local-6989586621680822717"><span class="hs-identifier hs-var hs-var hs-var hs-var">put_</span></a></span></span><span> </span><span id="local-6989586621680822716"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680822716"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span class="annot"><span class="annottext">SrcUnpackedness
</span><a href="GHC.Core.DataCon.html#SrcNoUnpack"><span class="hs-identifier hs-var">SrcNoUnpack</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; Word8 -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#putByte"><span class="hs-identifier hs-var">putByte</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680822716"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0</span></span><span>
</span><span id="line-899"></span><span>    </span><span class="annot"><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span id="local-6989586621680822715"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680822715"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span class="annot"><span class="annottext">SrcUnpackedness
</span><a href="GHC.Core.DataCon.html#SrcUnpack"><span class="hs-identifier hs-var">SrcUnpack</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; Word8 -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#putByte"><span class="hs-identifier hs-var">putByte</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680822715"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">1</span></span><span>
</span><span id="line-900"></span><span>    </span><span class="annot"><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span id="local-6989586621680822714"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680822714"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span class="annot"><span class="annottext">SrcUnpackedness
</span><a href="GHC.Core.DataCon.html#NoSrcUnpack"><span class="hs-identifier hs-var">NoSrcUnpack</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; Word8 -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#putByte"><span class="hs-identifier hs-var">putByte</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680822714"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">2</span></span><span>
</span><span id="line-901"></span><span>
</span><span id="line-902"></span><span>    </span><span id="local-6989586621680822705"><span class="annot"><span class="annottext">get :: BinHandle -&gt; IO SrcUnpackedness
</span><a href="#local-6989586621680822705"><span class="hs-identifier hs-var hs-var hs-var hs-var">get</span></a></span></span><span> </span><span id="local-6989586621680822704"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680822704"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-903"></span><span>      </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621680822703"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621680822703"><span class="hs-identifier hs-var">h</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; IO Word8
</span><a href="GHC.Utils.Binary.html#getByte"><span class="hs-identifier hs-var">getByte</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680822704"><span class="hs-identifier hs-var">bh</span></a></span><span>
</span><span id="line-904"></span><span>         </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621680822703"><span class="hs-identifier hs-var">h</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-905"></span><span>           </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SrcUnpackedness -&gt; IO SrcUnpackedness
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">SrcUnpackedness
</span><a href="GHC.Core.DataCon.html#SrcNoUnpack"><span class="hs-identifier hs-var">SrcNoUnpack</span></a></span><span>
</span><span id="line-906"></span><span>           </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">1</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SrcUnpackedness -&gt; IO SrcUnpackedness
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">SrcUnpackedness
</span><a href="GHC.Core.DataCon.html#SrcUnpack"><span class="hs-identifier hs-var">SrcUnpack</span></a></span><span>
</span><span id="line-907"></span><span>           </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SrcUnpackedness -&gt; IO SrcUnpackedness
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">SrcUnpackedness
</span><a href="GHC.Core.DataCon.html#NoSrcUnpack"><span class="hs-identifier hs-var">NoSrcUnpack</span></a></span><span>
</span><span id="line-908"></span><span>
</span><span id="line-909"></span><span class="hs-comment">-- | Compare strictness annotations</span><span>
</span><span id="line-910"></span><span class="annot"><a href="GHC.Core.DataCon.html#eqHsBang"><span class="hs-identifier hs-type">eqHsBang</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#HsImplBang"><span class="hs-identifier hs-type">HsImplBang</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#HsImplBang"><span class="hs-identifier hs-type">HsImplBang</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-911"></span><span id="eqHsBang"><span class="annot"><span class="annottext">eqHsBang :: HsImplBang -&gt; HsImplBang -&gt; Bool
</span><a href="GHC.Core.DataCon.html#eqHsBang"><span class="hs-identifier hs-var hs-var">eqHsBang</span></a></span></span><span> </span><span class="annot"><span class="annottext">HsImplBang
</span><a href="GHC.Core.DataCon.html#HsLazy"><span class="hs-identifier hs-var">HsLazy</span></a></span><span>               </span><span class="annot"><span class="annottext">HsImplBang
</span><a href="GHC.Core.DataCon.html#HsLazy"><span class="hs-identifier hs-var">HsLazy</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-912"></span><span class="annot"><a href="GHC.Core.DataCon.html#eqHsBang"><span class="hs-identifier hs-var">eqHsBang</span></a></span><span> </span><span class="annot"><span class="annottext">HsImplBang
</span><a href="GHC.Core.DataCon.html#HsStrict"><span class="hs-identifier hs-var">HsStrict</span></a></span><span>             </span><span class="annot"><span class="annottext">HsImplBang
</span><a href="GHC.Core.DataCon.html#HsStrict"><span class="hs-identifier hs-var">HsStrict</span></a></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-913"></span><span class="annot"><a href="GHC.Core.DataCon.html#eqHsBang"><span class="hs-identifier hs-var">eqHsBang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#HsUnpack"><span class="hs-identifier hs-type">HsUnpack</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Coercion
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#HsUnpack"><span class="hs-identifier hs-type">HsUnpack</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Coercion
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-914"></span><span class="annot"><a href="GHC.Core.DataCon.html#eqHsBang"><span class="hs-identifier hs-var">eqHsBang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#HsUnpack"><span class="hs-identifier hs-type">HsUnpack</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680822702"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680822702"><span class="hs-identifier hs-var">c1</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#HsUnpack"><span class="hs-identifier hs-type">HsUnpack</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680822701"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680822701"><span class="hs-identifier hs-var">c2</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-915"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type -&gt; Type -&gt; Bool
</span><a href="GHC.Core.Type.html#eqType"><span class="hs-identifier hs-var">eqType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Coercion -&gt; Type
</span><a href="GHC.Core.Coercion.html#coercionType"><span class="hs-identifier hs-var">coercionType</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680822702"><span class="hs-identifier hs-var">c1</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Coercion -&gt; Type
</span><a href="GHC.Core.Coercion.html#coercionType"><span class="hs-identifier hs-var">coercionType</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680822701"><span class="hs-identifier hs-var">c2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-916"></span><span class="annot"><a href="GHC.Core.DataCon.html#eqHsBang"><span class="hs-identifier hs-var">eqHsBang</span></a></span><span> </span><span class="annot"><span class="annottext">HsImplBang
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">HsImplBang
</span><span class="hs-identifier">_</span></span><span>                                       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-917"></span><span>
</span><span id="line-918"></span><span class="annot"><a href="GHC.Core.DataCon.html#isBanged"><span class="hs-identifier hs-type">isBanged</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#HsImplBang"><span class="hs-identifier hs-type">HsImplBang</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-919"></span><span id="isBanged"><span class="annot"><span class="annottext">isBanged :: HsImplBang -&gt; Bool
</span><a href="GHC.Core.DataCon.html#isBanged"><span class="hs-identifier hs-var hs-var">isBanged</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#HsUnpack"><span class="hs-identifier hs-type">HsUnpack</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-920"></span><span class="annot"><a href="GHC.Core.DataCon.html#isBanged"><span class="hs-identifier hs-var">isBanged</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#HsStrict"><span class="hs-identifier hs-type">HsStrict</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-921"></span><span class="annot"><a href="GHC.Core.DataCon.html#isBanged"><span class="hs-identifier hs-var">isBanged</span></a></span><span> </span><span class="annot"><span class="annottext">HsImplBang
</span><a href="GHC.Core.DataCon.html#HsLazy"><span class="hs-identifier hs-var">HsLazy</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-922"></span><span>
</span><span id="line-923"></span><span class="annot"><a href="GHC.Core.DataCon.html#isSrcStrict"><span class="hs-identifier hs-type">isSrcStrict</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#SrcStrictness"><span class="hs-identifier hs-type">SrcStrictness</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-924"></span><span id="isSrcStrict"><span class="annot"><span class="annottext">isSrcStrict :: SrcStrictness -&gt; Bool
</span><a href="GHC.Core.DataCon.html#isSrcStrict"><span class="hs-identifier hs-var hs-var">isSrcStrict</span></a></span></span><span> </span><span class="annot"><span class="annottext">SrcStrictness
</span><a href="GHC.Core.DataCon.html#SrcStrict"><span class="hs-identifier hs-var">SrcStrict</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-925"></span><span class="annot"><a href="GHC.Core.DataCon.html#isSrcStrict"><span class="hs-identifier hs-var">isSrcStrict</span></a></span><span> </span><span class="annot"><span class="annottext">SrcStrictness
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-926"></span><span>
</span><span id="line-927"></span><span class="annot"><a href="GHC.Core.DataCon.html#isSrcUnpacked"><span class="hs-identifier hs-type">isSrcUnpacked</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#SrcUnpackedness"><span class="hs-identifier hs-type">SrcUnpackedness</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-928"></span><span id="isSrcUnpacked"><span class="annot"><span class="annottext">isSrcUnpacked :: SrcUnpackedness -&gt; Bool
</span><a href="GHC.Core.DataCon.html#isSrcUnpacked"><span class="hs-identifier hs-var hs-var">isSrcUnpacked</span></a></span></span><span> </span><span class="annot"><span class="annottext">SrcUnpackedness
</span><a href="GHC.Core.DataCon.html#SrcUnpack"><span class="hs-identifier hs-var">SrcUnpack</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-929"></span><span class="annot"><a href="GHC.Core.DataCon.html#isSrcUnpacked"><span class="hs-identifier hs-var">isSrcUnpacked</span></a></span><span> </span><span class="annot"><span class="annottext">SrcUnpackedness
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-930"></span><span>
</span><span id="line-931"></span><span class="annot"><a href="GHC.Core.DataCon.html#isMarkedStrict"><span class="hs-identifier hs-type">isMarkedStrict</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#StrictnessMark"><span class="hs-identifier hs-type">StrictnessMark</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-932"></span><span id="isMarkedStrict"><span class="annot"><span class="annottext">isMarkedStrict :: StrictnessMark -&gt; Bool
</span><a href="GHC.Core.DataCon.html#isMarkedStrict"><span class="hs-identifier hs-var hs-var">isMarkedStrict</span></a></span></span><span> </span><span class="annot"><span class="annottext">StrictnessMark
</span><a href="GHC.Core.DataCon.html#NotMarkedStrict"><span class="hs-identifier hs-var">NotMarkedStrict</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-933"></span><span class="annot"><a href="GHC.Core.DataCon.html#isMarkedStrict"><span class="hs-identifier hs-var">isMarkedStrict</span></a></span><span> </span><span class="annot"><span class="annottext">StrictnessMark
</span><span class="hs-identifier">_</span></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>   </span><span class="hs-comment">-- All others are strict</span><span>
</span><span id="line-934"></span><span>
</span><span id="line-935"></span><span class="hs-comment">{- *********************************************************************
*                                                                      *
\subsection{Construction}
*                                                                      *
********************************************************************* -}</span><span>
</span><span id="line-940"></span><span>
</span><span id="line-941"></span><span class="hs-comment">-- | Build a new data constructor</span><span>
</span><span id="line-942"></span><span class="annot"><a href="GHC.Core.DataCon.html#mkDataCon"><span class="hs-identifier hs-type">mkDataCon</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-943"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>           </span><span class="hs-comment">-- ^ Is the constructor declared infix?</span><span>
</span><span id="line-944"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html#TyConRepName"><span class="hs-identifier hs-type">TyConRepName</span></a></span><span>   </span><span class="hs-comment">-- ^  TyConRepName for the promoted TyCon</span><span>
</span><span id="line-945"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.DataCon.html#HsSrcBang"><span class="hs-identifier hs-type">HsSrcBang</span></a></span><span class="hs-special">]</span><span>    </span><span class="hs-comment">-- ^ Strictness/unpack annotations, from user</span><span>
</span><span id="line-946"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.FieldLabel.html#FieldLabel"><span class="hs-identifier hs-type">FieldLabel</span></a></span><span class="hs-special">]</span><span>   </span><span class="hs-comment">-- ^ Field labels for the constructor,</span><span>
</span><span id="line-947"></span><span>                            </span><span class="hs-comment">-- if it is a record, otherwise empty</span><span>
</span><span id="line-948"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#TyVar"><span class="hs-identifier hs-type">TyVar</span></a></span><span class="hs-special">]</span><span>        </span><span class="hs-comment">-- ^ Universals.</span><span>
</span><span id="line-949"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#TyCoVar"><span class="hs-identifier hs-type">TyCoVar</span></a></span><span class="hs-special">]</span><span>      </span><span class="hs-comment">-- ^ Existentials.</span><span>
</span><span id="line-950"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#InvisTVBinder"><span class="hs-identifier hs-type">InvisTVBinder</span></a></span><span class="hs-special">]</span><span>    </span><span class="hs-comment">-- ^ User-written 'TyVarBinder's.</span><span>
</span><span id="line-951"></span><span>                                </span><span class="hs-comment">--   These must be Inferred/Specified.</span><span>
</span><span id="line-952"></span><span>                                </span><span class="hs-comment">--   See @Note [TyVarBinders in DataCons]@</span><span>
</span><span id="line-953"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.DataCon.html#EqSpec"><span class="hs-identifier hs-type">EqSpec</span></a></span><span class="hs-special">]</span><span>           </span><span class="hs-comment">-- ^ GADT equalities</span><span>
</span><span id="line-954"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#KnotTied"><span class="hs-identifier hs-type">KnotTied</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#ThetaType"><span class="hs-identifier hs-type">ThetaType</span></a></span><span> </span><span class="hs-comment">-- ^ Theta-type occurring before the arguments proper</span><span>
</span><span id="line-955"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#KnotTied"><span class="hs-identifier hs-type">KnotTied</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Scaled"><span class="hs-identifier hs-type">Scaled</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>    </span><span class="hs-comment">-- ^ Original argument types</span><span>
</span><span id="line-956"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#KnotTied"><span class="hs-identifier hs-type">KnotTied</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span>      </span><span class="hs-comment">-- ^ Original result type</span><span>
</span><span id="line-957"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html#RuntimeRepInfo"><span class="hs-identifier hs-type">RuntimeRepInfo</span></a></span><span>     </span><span class="hs-comment">-- ^ See comments on 'GHC.Core.TyCon.RuntimeRepInfo'</span><span>
</span><span id="line-958"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#KnotTied"><span class="hs-identifier hs-type">KnotTied</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html#TyCon"><span class="hs-identifier hs-type">TyCon</span></a></span><span>     </span><span class="hs-comment">-- ^ Representation type constructor</span><span>
</span><span id="line-959"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#ConTag"><span class="hs-identifier hs-type">ConTag</span></a></span><span>             </span><span class="hs-comment">-- ^ Constructor tag</span><span>
</span><span id="line-960"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#ThetaType"><span class="hs-identifier hs-type">ThetaType</span></a></span><span>          </span><span class="hs-comment">-- ^ The &quot;stupid theta&quot;, context of the data</span><span>
</span><span id="line-961"></span><span>                                </span><span class="hs-comment">-- declaration e.g. @data Eq a =&gt; T a ...@</span><span>
</span><span id="line-962"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>                 </span><span class="hs-comment">-- ^ Worker Id</span><span>
</span><span id="line-963"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataConRep"><span class="hs-identifier hs-type">DataConRep</span></a></span><span>         </span><span class="hs-comment">-- ^ Representation</span><span>
</span><span id="line-964"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span>
</span><span id="line-965"></span><span>  </span><span class="hs-comment">-- Can get the tag from the TyCon</span><span>
</span><span id="line-966"></span><span>
</span><span id="line-967"></span><span id="mkDataCon"><span class="annot"><span class="annottext">mkDataCon :: Name
-&gt; Bool
-&gt; Name
-&gt; [HsSrcBang]
-&gt; [FieldLabel]
-&gt; [TyVar]
-&gt; [TyVar]
-&gt; [InvisTVBinder]
-&gt; [EqSpec]
-&gt; [Type]
-&gt; [Scaled Type]
-&gt; Type
-&gt; RuntimeRepInfo
-&gt; TyCon
-&gt; Arity
-&gt; [Type]
-&gt; TyVar
-&gt; DataConRep
-&gt; DataCon
</span><a href="GHC.Core.DataCon.html#mkDataCon"><span class="hs-identifier hs-var hs-var">mkDataCon</span></a></span></span><span> </span><span id="local-6989586621680822696"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680822696"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621680822695"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680822695"><span class="hs-identifier hs-var">declared_infix</span></a></span></span><span> </span><span id="local-6989586621680822694"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680822694"><span class="hs-identifier hs-var">prom_info</span></a></span></span><span>
</span><span id="line-968"></span><span>          </span><span id="local-6989586621680822693"><span class="annot"><span class="annottext">[HsSrcBang]
</span><a href="#local-6989586621680822693"><span class="hs-identifier hs-var">arg_stricts</span></a></span></span><span>   </span><span class="hs-comment">-- Must match orig_arg_tys 1-1</span><span>
</span><span id="line-969"></span><span>          </span><span id="local-6989586621680822692"><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680822692"><span class="hs-identifier hs-var">fields</span></a></span></span><span>
</span><span id="line-970"></span><span>          </span><span id="local-6989586621680822691"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822691"><span class="hs-identifier hs-var">univ_tvs</span></a></span></span><span> </span><span id="local-6989586621680822690"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822690"><span class="hs-identifier hs-var">ex_tvs</span></a></span></span><span> </span><span id="local-6989586621680822689"><span class="annot"><span class="annottext">[InvisTVBinder]
</span><a href="#local-6989586621680822689"><span class="hs-identifier hs-var">user_tvbs</span></a></span></span><span>
</span><span id="line-971"></span><span>          </span><span id="local-6989586621680822688"><span class="annot"><span class="annottext">[EqSpec]
</span><a href="#local-6989586621680822688"><span class="hs-identifier hs-var">eq_spec</span></a></span></span><span> </span><span id="local-6989586621680822687"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822687"><span class="hs-identifier hs-var">theta</span></a></span></span><span>
</span><span id="line-972"></span><span>          </span><span id="local-6989586621680822686"><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680822686"><span class="hs-identifier hs-var">orig_arg_tys</span></a></span></span><span> </span><span id="local-6989586621680822685"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822685"><span class="hs-identifier hs-var">orig_res_ty</span></a></span></span><span> </span><span id="local-6989586621680822684"><span class="annot"><span class="annottext">RuntimeRepInfo
</span><a href="#local-6989586621680822684"><span class="hs-identifier hs-var">rep_info</span></a></span></span><span> </span><span id="local-6989586621680822683"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680822683"><span class="hs-identifier hs-var">rep_tycon</span></a></span></span><span> </span><span id="local-6989586621680822682"><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680822682"><span class="hs-identifier hs-var">tag</span></a></span></span><span>
</span><span id="line-973"></span><span>          </span><span id="local-6989586621680822681"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822681"><span class="hs-identifier hs-var">stupid_theta</span></a></span></span><span> </span><span id="local-6989586621680822680"><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822680"><span class="hs-identifier hs-var">work_id</span></a></span></span><span> </span><span id="local-6989586621680822679"><span class="annot"><span class="annottext">DataConRep
</span><a href="#local-6989586621680822679"><span class="hs-identifier hs-var">rep</span></a></span></span><span>
</span><span id="line-974"></span><span class="hs-comment">-- Warning: mkDataCon is not a good place to check certain invariants.</span><span>
</span><span id="line-975"></span><span class="hs-comment">-- If the programmer writes the wrong result type in the decl, thus:</span><span>
</span><span id="line-976"></span><span class="hs-comment">--      data T a where { MkT :: S }</span><span>
</span><span id="line-977"></span><span class="hs-comment">-- then it's possible that the univ_tvs may hit an assertion failure</span><span>
</span><span id="line-978"></span><span class="hs-comment">-- if you pull on univ_tvs.  This case is checked by checkValidDataCon,</span><span>
</span><span id="line-979"></span><span class="hs-comment">-- so the error is detected properly... it's just that assertions here</span><span>
</span><span id="line-980"></span><span class="hs-comment">-- are a little dodgy.</span><span>
</span><span id="line-981"></span><span>
</span><span id="line-982"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822678"><span class="hs-identifier hs-var">con</span></a></span><span>
</span><span id="line-983"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-984"></span><span>    </span><span id="local-6989586621680822674"><span class="annot"><span class="annottext">is_vanilla :: Bool
</span><a href="#local-6989586621680822674"><span class="hs-identifier hs-var hs-var">is_vanilla</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[TyVar] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822690"><span class="hs-identifier hs-var">ex_tvs</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">[EqSpec] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[EqSpec]
</span><a href="#local-6989586621680822688"><span class="hs-identifier hs-var">eq_spec</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">[Type] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822687"><span class="hs-identifier hs-var">theta</span></a></span><span>
</span><span id="line-985"></span><span>
</span><span id="line-986"></span><span>    </span><span id="local-6989586621680822678"><span class="annot"><span class="annottext">con :: DataCon
</span><a href="#local-6989586621680822678"><span class="hs-identifier hs-var hs-var">con</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MkData :: Name
-&gt; Unique
-&gt; Arity
-&gt; Bool
-&gt; [TyVar]
-&gt; [TyVar]
-&gt; [InvisTVBinder]
-&gt; [EqSpec]
-&gt; [Type]
-&gt; [Type]
-&gt; [Scaled Type]
-&gt; Type
-&gt; [HsSrcBang]
-&gt; [FieldLabel]
-&gt; TyVar
-&gt; DataConRep
-&gt; Arity
-&gt; Arity
-&gt; TyCon
-&gt; Type
-&gt; Bool
-&gt; TyCon
-&gt; DataCon
</span><a href="GHC.Core.DataCon.html#MkData"><span class="hs-identifier hs-type">MkData</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">dcName :: Name
</span><a href="GHC.Core.DataCon.html#dcName"><span class="hs-identifier hs-var">dcName</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680822696"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dcUnique :: Unique
</span><a href="GHC.Core.DataCon.html#dcUnique"><span class="hs-identifier hs-var">dcUnique</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Unique
</span><a href="GHC.Types.Name.html#nameUnique"><span class="hs-identifier hs-var">nameUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680822696"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-987"></span><span>                  </span><span class="annot"><span class="annottext">dcVanilla :: Bool
</span><a href="GHC.Core.DataCon.html#dcVanilla"><span class="hs-identifier hs-var">dcVanilla</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680822674"><span class="hs-identifier hs-var">is_vanilla</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dcInfix :: Bool
</span><a href="GHC.Core.DataCon.html#dcInfix"><span class="hs-identifier hs-var">dcInfix</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680822695"><span class="hs-identifier hs-var">declared_infix</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-988"></span><span>                  </span><span class="annot"><span class="annottext">dcUnivTyVars :: [TyVar]
</span><a href="GHC.Core.DataCon.html#dcUnivTyVars"><span class="hs-identifier hs-var">dcUnivTyVars</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822691"><span class="hs-identifier hs-var">univ_tvs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-989"></span><span>                  </span><span class="annot"><span class="annottext">dcExTyCoVars :: [TyVar]
</span><a href="GHC.Core.DataCon.html#dcExTyCoVars"><span class="hs-identifier hs-var">dcExTyCoVars</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822690"><span class="hs-identifier hs-var">ex_tvs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-990"></span><span>                  </span><span class="annot"><span class="annottext">dcUserTyVarBinders :: [InvisTVBinder]
</span><a href="GHC.Core.DataCon.html#dcUserTyVarBinders"><span class="hs-identifier hs-var">dcUserTyVarBinders</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[InvisTVBinder]
</span><a href="#local-6989586621680822689"><span class="hs-identifier hs-var">user_tvbs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-991"></span><span>                  </span><span class="annot"><span class="annottext">dcEqSpec :: [EqSpec]
</span><a href="GHC.Core.DataCon.html#dcEqSpec"><span class="hs-identifier hs-var">dcEqSpec</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[EqSpec]
</span><a href="#local-6989586621680822688"><span class="hs-identifier hs-var">eq_spec</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-992"></span><span>                  </span><span class="annot"><span class="annottext">dcOtherTheta :: [Type]
</span><a href="GHC.Core.DataCon.html#dcOtherTheta"><span class="hs-identifier hs-var">dcOtherTheta</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822687"><span class="hs-identifier hs-var">theta</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-993"></span><span>                  </span><span class="annot"><span class="annottext">dcStupidTheta :: [Type]
</span><a href="GHC.Core.DataCon.html#dcStupidTheta"><span class="hs-identifier hs-var">dcStupidTheta</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822681"><span class="hs-identifier hs-var">stupid_theta</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-994"></span><span>                  </span><span class="annot"><span class="annottext">dcOrigArgTys :: [Scaled Type]
</span><a href="GHC.Core.DataCon.html#dcOrigArgTys"><span class="hs-identifier hs-var">dcOrigArgTys</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680822686"><span class="hs-identifier hs-var">orig_arg_tys</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dcOrigResTy :: Type
</span><a href="GHC.Core.DataCon.html#dcOrigResTy"><span class="hs-identifier hs-var">dcOrigResTy</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822685"><span class="hs-identifier hs-var">orig_res_ty</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-995"></span><span>                  </span><span class="annot"><span class="annottext">dcRepTyCon :: TyCon
</span><a href="GHC.Core.DataCon.html#dcRepTyCon"><span class="hs-identifier hs-var">dcRepTyCon</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680822683"><span class="hs-identifier hs-var">rep_tycon</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-996"></span><span>                  </span><span class="annot"><span class="annottext">dcSrcBangs :: [HsSrcBang]
</span><a href="GHC.Core.DataCon.html#dcSrcBangs"><span class="hs-identifier hs-var">dcSrcBangs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[HsSrcBang]
</span><a href="#local-6989586621680822693"><span class="hs-identifier hs-var">arg_stricts</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-997"></span><span>                  </span><span class="annot"><span class="annottext">dcFields :: [FieldLabel]
</span><a href="GHC.Core.DataCon.html#dcFields"><span class="hs-identifier hs-var">dcFields</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621680822692"><span class="hs-identifier hs-var">fields</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dcTag :: Arity
</span><a href="GHC.Core.DataCon.html#dcTag"><span class="hs-identifier hs-var">dcTag</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680822682"><span class="hs-identifier hs-var">tag</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dcRepType :: Type
</span><a href="GHC.Core.DataCon.html#dcRepType"><span class="hs-identifier hs-var">dcRepType</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822667"><span class="hs-identifier hs-var">rep_ty</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-998"></span><span>                  </span><span class="annot"><span class="annottext">dcWorkId :: TyVar
</span><a href="GHC.Core.DataCon.html#dcWorkId"><span class="hs-identifier hs-var">dcWorkId</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822680"><span class="hs-identifier hs-var">work_id</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-999"></span><span>                  </span><span class="annot"><span class="annottext">dcRep :: DataConRep
</span><a href="GHC.Core.DataCon.html#dcRep"><span class="hs-identifier hs-var">dcRep</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataConRep
</span><a href="#local-6989586621680822679"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1000"></span><span>                  </span><span class="annot"><span class="annottext">dcSourceArity :: Arity
</span><a href="GHC.Core.DataCon.html#dcSourceArity"><span class="hs-identifier hs-var">dcSourceArity</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Scaled Type] -&gt; Arity
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Arity
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680822686"><span class="hs-identifier hs-var">orig_arg_tys</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1001"></span><span>                  </span><span class="annot"><span class="annottext">dcRepArity :: Arity
</span><a href="GHC.Core.DataCon.html#dcRepArity"><span class="hs-identifier hs-var">dcRepArity</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Scaled Type] -&gt; Arity
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Arity
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680822665"><span class="hs-identifier hs-var">rep_arg_tys</span></a></span><span> </span><span class="annot"><span class="annottext">Arity -&gt; Arity -&gt; Arity
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">(TyVar -&gt; Bool) -&gt; [TyVar] -&gt; Arity
forall a. (a -&gt; Bool) -&gt; [a] -&gt; Arity
</span><a href="GHC.Utils.Misc.html#count"><span class="hs-identifier hs-var">count</span></a></span><span> </span><span class="annot"><span class="annottext">TyVar -&gt; Bool
</span><a href="GHC.Types.Var.html#isCoVar"><span class="hs-identifier hs-var">isCoVar</span></a></span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822690"><span class="hs-identifier hs-var">ex_tvs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1002"></span><span>                  </span><span class="annot"><span class="annottext">dcPromoted :: TyCon
</span><a href="GHC.Core.DataCon.html#dcPromoted"><span class="hs-identifier hs-var">dcPromoted</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680822661"><span class="hs-identifier hs-var">promoted</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1003"></span><span>
</span><span id="line-1004"></span><span>        </span><span class="hs-comment">-- The 'arg_stricts' passed to mkDataCon are simply those for the</span><span>
</span><span id="line-1005"></span><span>        </span><span class="hs-comment">-- source-language arguments.  We add extra ones for the</span><span>
</span><span id="line-1006"></span><span>        </span><span class="hs-comment">-- dictionary arguments right here.</span><span>
</span><span id="line-1007"></span><span>
</span><span id="line-1008"></span><span>    </span><span id="local-6989586621680822665"><span class="annot"><span class="annottext">rep_arg_tys :: [Scaled Type]
</span><a href="#local-6989586621680822665"><span class="hs-identifier hs-var hs-var">rep_arg_tys</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; [Scaled Type]
</span><a href="GHC.Core.DataCon.html#dataConRepArgTys"><span class="hs-identifier hs-var">dataConRepArgTys</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822678"><span class="hs-identifier hs-var">con</span></a></span><span>
</span><span id="line-1009"></span><span>
</span><span id="line-1010"></span><span>    </span><span id="local-6989586621680822667"><span class="annot"><span class="annottext">rep_ty :: Type
</span><a href="#local-6989586621680822667"><span class="hs-identifier hs-var hs-var">rep_ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1011"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">DataConRep
</span><a href="#local-6989586621680822679"><span class="hs-identifier hs-var">rep</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1012"></span><span>        </span><span class="hs-comment">-- If the DataCon has no wrapper, then the worker's type *is* the</span><span>
</span><span id="line-1013"></span><span>        </span><span class="hs-comment">-- user-facing type, so we can simply use dataConWrapperType.</span><span>
</span><span id="line-1014"></span><span>        </span><span class="annot"><span class="annottext">DataConRep
</span><a href="GHC.Core.DataCon.html#NoDataConRep"><span class="hs-identifier hs-var">NoDataConRep</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Type
</span><a href="GHC.Core.DataCon.html#dataConWrapperType"><span class="hs-identifier hs-var">dataConWrapperType</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822678"><span class="hs-identifier hs-var">con</span></a></span><span>
</span><span id="line-1015"></span><span>        </span><span class="hs-comment">-- If the DataCon has a wrapper, then the worker's type is never seen</span><span>
</span><span id="line-1016"></span><span>        </span><span class="hs-comment">-- by the user. The visibilities we pick do not matter here.</span><span>
</span><span id="line-1017"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#DCR"><span class="hs-identifier hs-type">DCR</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[TyVar] -&gt; Type -&gt; Type
</span><a href="GHC.Core.Type.html#mkInfForAllTys"><span class="hs-identifier hs-var">mkInfForAllTys</span></a></span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822691"><span class="hs-identifier hs-var">univ_tvs</span></a></span><span> </span><span class="annot"><span class="annottext">(Type -&gt; Type) -&gt; Type -&gt; Type
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[TyVar] -&gt; Type -&gt; Type
</span><a href="GHC.Core.Type.html#mkTyCoInvForAllTys"><span class="hs-identifier hs-var">mkTyCoInvForAllTys</span></a></span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822690"><span class="hs-identifier hs-var">ex_tvs</span></a></span><span> </span><span class="annot"><span class="annottext">(Type -&gt; Type) -&gt; Type -&gt; Type
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1018"></span><span>                 </span><span class="annot"><span class="annottext">[Scaled Type] -&gt; Type -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#mkVisFunTys"><span class="hs-identifier hs-var">mkVisFunTys</span></a></span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680822665"><span class="hs-identifier hs-var">rep_arg_tys</span></a></span><span> </span><span class="annot"><span class="annottext">(Type -&gt; Type) -&gt; Type -&gt; Type
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1019"></span><span>                 </span><span class="annot"><span class="annottext">TyCon -&gt; [Type] -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#mkTyConApp"><span class="hs-identifier hs-var">mkTyConApp</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680822683"><span class="hs-identifier hs-var">rep_tycon</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[TyVar] -&gt; [Type]
</span><a href="GHC.Core.TyCo.Rep.html#mkTyVarTys"><span class="hs-identifier hs-var">mkTyVarTys</span></a></span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822691"><span class="hs-identifier hs-var">univ_tvs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1020"></span><span>
</span><span id="line-1021"></span><span>      </span><span class="hs-comment">-- See Note [Promoted data constructors] in GHC.Core.TyCon</span><span>
</span><span id="line-1022"></span><span>    </span><span id="local-6989586621680822655"><span class="annot"><span class="annottext">prom_tv_bndrs :: [TyConBinder]
</span><a href="#local-6989586621680822655"><span class="hs-identifier hs-var hs-var">prom_tv_bndrs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">ArgFlag -&gt; TyVar -&gt; TyConBinder
</span><a href="GHC.Core.TyCon.html#mkNamedTyConBinder"><span class="hs-identifier hs-var">mkNamedTyConBinder</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Specificity -&gt; ArgFlag
</span><a href="GHC.Types.Var.html#Invisible"><span class="hs-identifier hs-var">Invisible</span></a></span><span> </span><span class="annot"><span class="annottext">Specificity
</span><a href="#local-6989586621680822652"><span class="hs-identifier hs-var">spec</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822651"><span class="hs-identifier hs-var">tv</span></a></span><span>
</span><span id="line-1023"></span><span>                    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Bndr"><span class="hs-identifier hs-type">Bndr</span></a></span><span> </span><span id="local-6989586621680822651"><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822651"><span class="hs-identifier hs-var">tv</span></a></span></span><span> </span><span id="local-6989586621680822652"><span class="annot"><span class="annottext">Specificity
</span><a href="#local-6989586621680822652"><span class="hs-identifier hs-var">spec</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[InvisTVBinder]
</span><a href="#local-6989586621680822689"><span class="hs-identifier hs-var">user_tvbs</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-1024"></span><span>
</span><span id="line-1025"></span><span>    </span><span id="local-6989586621680822645"><span class="annot"><span class="annottext">fresh_names :: [Name]
</span><a href="#local-6989586621680822645"><span class="hs-identifier hs-var hs-var">fresh_names</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; [Name]
</span><a href="GHC.Core.DataCon.html#freshNames"><span class="hs-identifier hs-var">freshNames</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(InvisTVBinder -&gt; Name) -&gt; [InvisTVBinder] -&gt; [Name]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">InvisTVBinder -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span> </span><span class="annot"><span class="annottext">[InvisTVBinder]
</span><a href="#local-6989586621680822689"><span class="hs-identifier hs-var">user_tvbs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1026"></span><span>      </span><span class="hs-comment">-- fresh_names: make sure that the &quot;anonymous&quot; tyvars don't</span><span>
</span><span id="line-1027"></span><span>      </span><span class="hs-comment">-- clash in name or unique with the universal/existential ones.</span><span>
</span><span id="line-1028"></span><span>      </span><span class="hs-comment">-- Tiresome!  And unnecessary because these tyvars are never looked at</span><span>
</span><span id="line-1029"></span><span>    </span><span id="local-6989586621680822643"><span class="annot"><span class="annottext">prom_theta_bndrs :: [TyConBinder]
</span><a href="#local-6989586621680822643"><span class="hs-identifier hs-var hs-var">prom_theta_bndrs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">AnonArgFlag -&gt; TyVar -&gt; TyConBinder
</span><a href="GHC.Core.TyCon.html#mkAnonTyConBinder"><span class="hs-identifier hs-var">mkAnonTyConBinder</span></a></span><span> </span><span class="annot"><span class="annottext">AnonArgFlag
</span><a href="GHC.Types.Var.html#InvisArg"><span class="hs-identifier hs-var">InvisArg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; Type -&gt; TyVar
</span><a href="GHC.Types.Var.html#mkTyVar"><span class="hs-identifier hs-var">mkTyVar</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680822639"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822638"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1030"></span><span>     </span><span class="hs-comment">{- Invisible -}</span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680822639"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680822639"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621680822638"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822638"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680822645"><span class="hs-identifier hs-var">fresh_names</span></a></span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; [Type] -&gt; [(Name, Type)]
forall a b. [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="../../base/src/GHC.List.html#zip"><span class="hs-operator hs-var">`zip`</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822687"><span class="hs-identifier hs-var">theta</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-1031"></span><span>    </span><span id="local-6989586621680822637"><span class="annot"><span class="annottext">prom_arg_bndrs :: [TyConBinder]
</span><a href="#local-6989586621680822637"><span class="hs-identifier hs-var hs-var">prom_arg_bndrs</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">AnonArgFlag -&gt; TyVar -&gt; TyConBinder
</span><a href="GHC.Core.TyCon.html#mkAnonTyConBinder"><span class="hs-identifier hs-var">mkAnonTyConBinder</span></a></span><span> </span><span class="annot"><span class="annottext">AnonArgFlag
</span><a href="GHC.Types.Var.html#VisArg"><span class="hs-identifier hs-var">VisArg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; Type -&gt; TyVar
</span><a href="GHC.Types.Var.html#mkTyVar"><span class="hs-identifier hs-var">mkTyVar</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680822635"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822634"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1032"></span><span>     </span><span class="hs-comment">{- Visible -}</span><span>     </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680822635"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680822635"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621680822634"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822634"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Type] -&gt; [Name] -&gt; [Name]
forall b a. [b] -&gt; [a] -&gt; [a]
</span><a href="GHC.Utils.Misc.html#dropList"><span class="hs-identifier hs-var">dropList</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822687"><span class="hs-identifier hs-var">theta</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680822645"><span class="hs-identifier hs-var">fresh_names</span></a></span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; [Type] -&gt; [(Name, Type)]
forall a b. [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="../../base/src/GHC.List.html#zip"><span class="hs-operator hs-var">`zip`</span></a></span><span> </span><span class="annot"><span class="annottext">(Scaled Type -&gt; Type) -&gt; [Scaled Type] -&gt; [Type]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Scaled Type -&gt; Type
forall a. Scaled a -&gt; a
</span><a href="GHC.Core.TyCo.Rep.html#scaledThing"><span class="hs-identifier hs-var">scaledThing</span></a></span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680822686"><span class="hs-identifier hs-var">orig_arg_tys</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-1033"></span><span>    </span><span id="local-6989586621680822631"><span class="annot"><span class="annottext">prom_bndrs :: [TyConBinder]
</span><a href="#local-6989586621680822631"><span class="hs-identifier hs-var hs-var">prom_bndrs</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[TyConBinder]
</span><a href="#local-6989586621680822655"><span class="hs-identifier hs-var">prom_tv_bndrs</span></a></span><span> </span><span class="annot"><span class="annottext">[TyConBinder] -&gt; [TyConBinder] -&gt; [TyConBinder]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[TyConBinder]
</span><a href="#local-6989586621680822643"><span class="hs-identifier hs-var">prom_theta_bndrs</span></a></span><span> </span><span class="annot"><span class="annottext">[TyConBinder] -&gt; [TyConBinder] -&gt; [TyConBinder]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[TyConBinder]
</span><a href="#local-6989586621680822637"><span class="hs-identifier hs-var">prom_arg_bndrs</span></a></span><span>
</span><span id="line-1034"></span><span>    </span><span id="local-6989586621680822630"><span class="annot"><span class="annottext">prom_res_kind :: Type
</span><a href="#local-6989586621680822630"><span class="hs-identifier hs-var hs-var">prom_res_kind</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822685"><span class="hs-identifier hs-var">orig_res_ty</span></a></span><span>
</span><span id="line-1035"></span><span>    </span><span id="local-6989586621680822661"><span class="annot"><span class="annottext">promoted :: TyCon
</span><a href="#local-6989586621680822661"><span class="hs-identifier hs-var hs-var">promoted</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon
-&gt; Name
-&gt; Name
-&gt; [TyConBinder]
-&gt; Type
-&gt; [Role]
-&gt; RuntimeRepInfo
-&gt; TyCon
</span><a href="GHC.Core.TyCon.html#mkPromotedDataCon"><span class="hs-identifier hs-var">mkPromotedDataCon</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822678"><span class="hs-identifier hs-var">con</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680822696"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680822694"><span class="hs-identifier hs-var">prom_info</span></a></span><span> </span><span class="annot"><span class="annottext">[TyConBinder]
</span><a href="#local-6989586621680822631"><span class="hs-identifier hs-var">prom_bndrs</span></a></span><span>
</span><span id="line-1036"></span><span>                                         </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822630"><span class="hs-identifier hs-var">prom_res_kind</span></a></span><span> </span><span class="annot"><span class="annottext">[Role]
</span><a href="#local-6989586621680822628"><span class="hs-identifier hs-var">roles</span></a></span><span> </span><span class="annot"><span class="annottext">RuntimeRepInfo
</span><a href="#local-6989586621680822684"><span class="hs-identifier hs-var">rep_info</span></a></span><span>
</span><span id="line-1037"></span><span>
</span><span id="line-1038"></span><span>    </span><span id="local-6989586621680822628"><span class="annot"><span class="annottext">roles :: [Role]
</span><a href="#local-6989586621680822628"><span class="hs-identifier hs-var hs-var">roles</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(TyVar -&gt; Role) -&gt; [TyVar] -&gt; [Role]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680822627"><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822627"><span class="hs-identifier hs-var">tv</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">TyVar -&gt; Bool
</span><a href="GHC.Types.Var.html#isTyVar"><span class="hs-identifier hs-var">isTyVar</span></a></span><span> </span><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822627"><span class="hs-identifier hs-var">tv</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Role
</span><a href="GHC.Core.Coercion.Axiom.html#Nominal"><span class="hs-identifier hs-var">Nominal</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Role
</span><a href="GHC.Core.Coercion.Axiom.html#Phantom"><span class="hs-identifier hs-var">Phantom</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1039"></span><span>                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822691"><span class="hs-identifier hs-var">univ_tvs</span></a></span><span> </span><span class="annot"><span class="annottext">[TyVar] -&gt; [TyVar] -&gt; [TyVar]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822690"><span class="hs-identifier hs-var">ex_tvs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1040"></span><span>            </span><span class="annot"><span class="annottext">[Role] -&gt; [Role] -&gt; [Role]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">(Type -&gt; Role) -&gt; [Type] -&gt; [Role]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Role -&gt; Type -&gt; Role
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">Role
</span><a href="GHC.Core.Coercion.Axiom.html#Representational"><span class="hs-identifier hs-var">Representational</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822687"><span class="hs-identifier hs-var">theta</span></a></span><span> </span><span class="annot"><span class="annottext">[Type] -&gt; [Type] -&gt; [Type]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">(Scaled Type -&gt; Type) -&gt; [Scaled Type] -&gt; [Type]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Scaled Type -&gt; Type
forall a. Scaled a -&gt; a
</span><a href="GHC.Core.TyCo.Rep.html#scaledThing"><span class="hs-identifier hs-var">scaledThing</span></a></span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680822686"><span class="hs-identifier hs-var">orig_arg_tys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1041"></span><span>
</span><span id="line-1042"></span><span class="annot"><a href="GHC.Core.DataCon.html#freshNames"><span class="hs-identifier hs-type">freshNames</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1043"></span><span class="hs-comment">-- Make an infinite list of Names whose Uniques and OccNames</span><span>
</span><span id="line-1044"></span><span class="hs-comment">-- differ from those in the 'avoid' list</span><span>
</span><span id="line-1045"></span><span id="freshNames"><span class="annot"><span class="annottext">freshNames :: [Name] -&gt; [Name]
</span><a href="GHC.Core.DataCon.html#freshNames"><span class="hs-identifier hs-var hs-var">freshNames</span></a></span></span><span> </span><span id="local-6989586621680822621"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680822621"><span class="hs-identifier hs-var">avoids</span></a></span></span><span>
</span><span id="line-1046"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; OccName -&gt; Name
</span><a href="GHC.Types.Name.html#mkSystemName"><span class="hs-identifier hs-var">mkSystemName</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680822619"><span class="hs-identifier hs-var">uniq</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680822618"><span class="hs-identifier hs-var">occ</span></a></span><span>
</span><span id="line-1047"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621680822617"><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680822617"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Arity
</span><span class="hs-number">0</span></span><span class="hs-glyph">..</span><span class="hs-special">]</span><span>
</span><span id="line-1048"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680822619"><span class="annot"><span class="annottext">uniq :: Unique
</span><a href="#local-6989586621680822619"><span class="hs-identifier hs-var hs-var">uniq</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Arity -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkAlphaTyVarUnique"><span class="hs-identifier hs-var">mkAlphaTyVarUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680822617"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-1049"></span><span>          </span><span id="local-6989586621680822618"><span class="annot"><span class="annottext">occ :: OccName
</span><a href="#local-6989586621680822618"><span class="hs-identifier hs-var hs-var">occ</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FieldLabelString -&gt; OccName
</span><a href="GHC.Types.Name.Occurrence.html#mkTyVarOccFS"><span class="hs-identifier hs-var">mkTyVarOccFS</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FieldLabelString
</span><a href="GHC.Data.FastString.html#mkFastString"><span class="hs-identifier hs-var">mkFastString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'x'</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; String -&gt; String
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">Arity -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680822617"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1050"></span><span>
</span><span id="line-1051"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680822619"><span class="hs-identifier hs-var">uniq</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; UniqSet Unique -&gt; Bool
forall a. Uniquable a =&gt; a -&gt; UniqSet a -&gt; Bool
</span><a href="GHC.Types.Unique.Set.html#elementOfUniqSet"><span class="hs-operator hs-var">`elementOfUniqSet`</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSet Unique
</span><a href="#local-6989586621680822610"><span class="hs-identifier hs-var">avoid_uniqs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1052"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680822618"><span class="hs-identifier hs-var">occ</span></a></span><span> </span><span class="annot"><span class="annottext">OccName -&gt; OccSet -&gt; Bool
</span><a href="GHC.Types.Name.Occurrence.html#elemOccSet"><span class="hs-operator hs-var">`elemOccSet`</span></a></span><span> </span><span class="annot"><span class="annottext">OccSet
</span><a href="#local-6989586621680822608"><span class="hs-identifier hs-var">avoid_occs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-1053"></span><span>
</span><span id="line-1054"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1055"></span><span>    </span><span class="annot"><a href="#local-6989586621680822610"><span class="hs-identifier hs-type">avoid_uniqs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Set.html#UniqSet"><span class="hs-identifier hs-type">UniqSet</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-1056"></span><span>    </span><span id="local-6989586621680822610"><span class="annot"><span class="annottext">avoid_uniqs :: UniqSet Unique
</span><a href="#local-6989586621680822610"><span class="hs-identifier hs-var hs-var">avoid_uniqs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Unique] -&gt; UniqSet Unique
forall a. Uniquable a =&gt; [a] -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#mkUniqSet"><span class="hs-identifier hs-var">mkUniqSet</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Name -&gt; Unique) -&gt; [Name] -&gt; [Unique]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; Unique
forall a. Uniquable a =&gt; a -&gt; Unique
</span><a href="GHC.Types.Unique.html#getUnique"><span class="hs-identifier hs-var">getUnique</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680822621"><span class="hs-identifier hs-var">avoids</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1057"></span><span>
</span><span id="line-1058"></span><span>    </span><span class="annot"><a href="#local-6989586621680822608"><span class="hs-identifier hs-type">avoid_occs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccSet"><span class="hs-identifier hs-type">OccSet</span></a></span><span>
</span><span id="line-1059"></span><span>    </span><span id="local-6989586621680822608"><span class="annot"><span class="annottext">avoid_occs :: OccSet
</span><a href="#local-6989586621680822608"><span class="hs-identifier hs-var hs-var">avoid_occs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[OccName] -&gt; OccSet
</span><a href="GHC.Types.Name.Occurrence.html#mkOccSet"><span class="hs-identifier hs-var">mkOccSet</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Name -&gt; OccName) -&gt; [Name] -&gt; [OccName]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; OccName
forall a. NamedThing a =&gt; a -&gt; OccName
</span><a href="GHC.Types.Name.html#getOccName"><span class="hs-identifier hs-var">getOccName</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680822621"><span class="hs-identifier hs-var">avoids</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1060"></span><span>
</span><span id="line-1061"></span><span class="hs-comment">-- | The 'Name' of the 'DataCon', giving it a unique, rooted identification</span><span>
</span><span id="line-1062"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConName"><span class="hs-identifier hs-type">dataConName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-1063"></span><span id="dataConName"><span class="annot"><span class="annottext">dataConName :: DataCon -&gt; Name
</span><a href="GHC.Core.DataCon.html#dataConName"><span class="hs-identifier hs-var hs-var">dataConName</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Name
</span><a href="GHC.Core.DataCon.html#dcName"><span class="hs-identifier hs-var hs-var">dcName</span></a></span><span>
</span><span id="line-1064"></span><span>
</span><span id="line-1065"></span><span class="hs-comment">-- | The tag used for ordering 'DataCon's</span><span>
</span><span id="line-1066"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConTag"><span class="hs-identifier hs-type">dataConTag</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#ConTag"><span class="hs-identifier hs-type">ConTag</span></a></span><span>
</span><span id="line-1067"></span><span id="dataConTag"><span class="annot"><span class="annottext">dataConTag :: DataCon -&gt; Arity
</span><a href="GHC.Core.DataCon.html#dataConTag"><span class="hs-identifier hs-var hs-var">dataConTag</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Arity
</span><a href="GHC.Core.DataCon.html#dcTag"><span class="hs-identifier hs-var hs-var">dcTag</span></a></span><span>
</span><span id="line-1068"></span><span>
</span><span id="line-1069"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConTagZ"><span class="hs-identifier hs-type">dataConTagZ</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#ConTagZ"><span class="hs-identifier hs-type">ConTagZ</span></a></span><span>
</span><span id="line-1070"></span><span id="dataConTagZ"><span class="annot"><span class="annottext">dataConTagZ :: DataCon -&gt; Arity
</span><a href="GHC.Core.DataCon.html#dataConTagZ"><span class="hs-identifier hs-var hs-var">dataConTagZ</span></a></span></span><span> </span><span id="local-6989586621680822603"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822603"><span class="hs-identifier hs-var">con</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Arity
</span><a href="GHC.Core.DataCon.html#dataConTag"><span class="hs-identifier hs-var">dataConTag</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822603"><span class="hs-identifier hs-var">con</span></a></span><span> </span><span class="annot"><span class="annottext">Arity -&gt; Arity -&gt; Arity
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Arity
</span><a href="GHC.Types.Basic.html#fIRST_TAG"><span class="hs-identifier hs-var">fIRST_TAG</span></a></span><span>
</span><span id="line-1071"></span><span>
</span><span id="line-1072"></span><span class="hs-comment">-- | The type constructor that we are building via this data constructor</span><span>
</span><span id="line-1073"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConTyCon"><span class="hs-identifier hs-type">dataConTyCon</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html#TyCon"><span class="hs-identifier hs-type">TyCon</span></a></span><span>
</span><span id="line-1074"></span><span id="dataConTyCon"><span class="annot"><span class="annottext">dataConTyCon :: DataCon -&gt; TyCon
</span><a href="GHC.Core.DataCon.html#dataConTyCon"><span class="hs-identifier hs-var hs-var">dataConTyCon</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; TyCon
</span><a href="GHC.Core.DataCon.html#dcRepTyCon"><span class="hs-identifier hs-var hs-var">dcRepTyCon</span></a></span><span>
</span><span id="line-1075"></span><span>
</span><span id="line-1076"></span><span class="hs-comment">-- | The original type constructor used in the definition of this data</span><span>
</span><span id="line-1077"></span><span class="hs-comment">-- constructor.  In case of a data family instance, that will be the family</span><span>
</span><span id="line-1078"></span><span class="hs-comment">-- type constructor.</span><span>
</span><span id="line-1079"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConOrigTyCon"><span class="hs-identifier hs-type">dataConOrigTyCon</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html#TyCon"><span class="hs-identifier hs-type">TyCon</span></a></span><span>
</span><span id="line-1080"></span><span id="dataConOrigTyCon"><span class="annot"><span class="annottext">dataConOrigTyCon :: DataCon -&gt; TyCon
</span><a href="GHC.Core.DataCon.html#dataConOrigTyCon"><span class="hs-identifier hs-var hs-var">dataConOrigTyCon</span></a></span></span><span> </span><span id="local-6989586621680822602"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822602"><span class="hs-identifier hs-var">dc</span></a></span></span><span>
</span><span id="line-1081"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680822601"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680822601"><span class="hs-identifier hs-var">tc</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Type]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Maybe (TyCon, [Type])
</span><a href="GHC.Core.TyCon.html#tyConFamInst_maybe"><span class="hs-identifier hs-var">tyConFamInst_maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; TyCon
</span><a href="GHC.Core.DataCon.html#dcRepTyCon"><span class="hs-identifier hs-var hs-var">dcRepTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822602"><span class="hs-identifier hs-var">dc</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680822601"><span class="hs-identifier hs-var">tc</span></a></span><span>
</span><span id="line-1082"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                                          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; TyCon
</span><a href="GHC.Core.DataCon.html#dcRepTyCon"><span class="hs-identifier hs-var hs-var">dcRepTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822602"><span class="hs-identifier hs-var">dc</span></a></span><span>
</span><span id="line-1083"></span><span>
</span><span id="line-1084"></span><span class="hs-comment">-- | The representation type of the data constructor, i.e. the sort</span><span>
</span><span id="line-1085"></span><span class="hs-comment">-- type that will represent values of this type at runtime</span><span>
</span><span id="line-1086"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConRepType"><span class="hs-identifier hs-type">dataConRepType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span>
</span><span id="line-1087"></span><span id="dataConRepType"><span class="annot"><span class="annottext">dataConRepType :: DataCon -&gt; Type
</span><a href="GHC.Core.DataCon.html#dataConRepType"><span class="hs-identifier hs-var hs-var">dataConRepType</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Type
</span><a href="GHC.Core.DataCon.html#dcRepType"><span class="hs-identifier hs-var hs-var">dcRepType</span></a></span><span>
</span><span id="line-1088"></span><span>
</span><span id="line-1089"></span><span class="hs-comment">-- | Should the 'DataCon' be presented infix?</span><span>
</span><span id="line-1090"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConIsInfix"><span class="hs-identifier hs-type">dataConIsInfix</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-1091"></span><span id="dataConIsInfix"><span class="annot"><span class="annottext">dataConIsInfix :: DataCon -&gt; Bool
</span><a href="GHC.Core.DataCon.html#dataConIsInfix"><span class="hs-identifier hs-var hs-var">dataConIsInfix</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Bool
</span><a href="GHC.Core.DataCon.html#dcInfix"><span class="hs-identifier hs-var hs-var">dcInfix</span></a></span><span>
</span><span id="line-1092"></span><span>
</span><span id="line-1093"></span><span class="hs-comment">-- | The universally-quantified type variables of the constructor</span><span>
</span><span id="line-1094"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConUnivTyVars"><span class="hs-identifier hs-type">dataConUnivTyVars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#TyVar"><span class="hs-identifier hs-type">TyVar</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1095"></span><span id="dataConUnivTyVars"><span class="annot"><span class="annottext">dataConUnivTyVars :: DataCon -&gt; [TyVar]
</span><a href="GHC.Core.DataCon.html#dataConUnivTyVars"><span class="hs-identifier hs-var hs-var">dataConUnivTyVars</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#MkData"><span class="hs-identifier hs-type">MkData</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dcUnivTyVars :: DataCon -&gt; [TyVar]
</span><a href="GHC.Core.DataCon.html#dcUnivTyVars"><span class="hs-identifier hs-var">dcUnivTyVars</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822599"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822599"><span class="hs-identifier hs-var">tvbs</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822599"><span class="hs-identifier hs-var">tvbs</span></a></span><span>
</span><span id="line-1096"></span><span>
</span><span id="line-1097"></span><span class="hs-comment">-- | The existentially-quantified type/coercion variables of the constructor</span><span>
</span><span id="line-1098"></span><span class="hs-comment">-- including dependent (kind-) GADT equalities</span><span>
</span><span id="line-1099"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConExTyCoVars"><span class="hs-identifier hs-type">dataConExTyCoVars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#TyCoVar"><span class="hs-identifier hs-type">TyCoVar</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1100"></span><span id="dataConExTyCoVars"><span class="annot"><span class="annottext">dataConExTyCoVars :: DataCon -&gt; [TyVar]
</span><a href="GHC.Core.DataCon.html#dataConExTyCoVars"><span class="hs-identifier hs-var hs-var">dataConExTyCoVars</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#MkData"><span class="hs-identifier hs-type">MkData</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dcExTyCoVars :: DataCon -&gt; [TyVar]
</span><a href="GHC.Core.DataCon.html#dcExTyCoVars"><span class="hs-identifier hs-var">dcExTyCoVars</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822598"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822598"><span class="hs-identifier hs-var">tvbs</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822598"><span class="hs-identifier hs-var">tvbs</span></a></span><span>
</span><span id="line-1101"></span><span>
</span><span id="line-1102"></span><span class="hs-comment">-- | Both the universal and existential type/coercion variables of the constructor</span><span>
</span><span id="line-1103"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConUnivAndExTyCoVars"><span class="hs-identifier hs-type">dataConUnivAndExTyCoVars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#TyCoVar"><span class="hs-identifier hs-type">TyCoVar</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1104"></span><span id="dataConUnivAndExTyCoVars"><span class="annot"><span class="annottext">dataConUnivAndExTyCoVars :: DataCon -&gt; [TyVar]
</span><a href="GHC.Core.DataCon.html#dataConUnivAndExTyCoVars"><span class="hs-identifier hs-var hs-var">dataConUnivAndExTyCoVars</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#MkData"><span class="hs-identifier hs-type">MkData</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dcUnivTyVars :: DataCon -&gt; [TyVar]
</span><a href="GHC.Core.DataCon.html#dcUnivTyVars"><span class="hs-identifier hs-var">dcUnivTyVars</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822597"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822597"><span class="hs-identifier hs-var">univ_tvs</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dcExTyCoVars :: DataCon -&gt; [TyVar]
</span><a href="GHC.Core.DataCon.html#dcExTyCoVars"><span class="hs-identifier hs-var">dcExTyCoVars</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822596"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822596"><span class="hs-identifier hs-var">ex_tvs</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-1105"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822597"><span class="hs-identifier hs-var">univ_tvs</span></a></span><span> </span><span class="annot"><span class="annottext">[TyVar] -&gt; [TyVar] -&gt; [TyVar]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822596"><span class="hs-identifier hs-var">ex_tvs</span></a></span><span>
</span><span id="line-1106"></span><span>
</span><span id="line-1107"></span><span class="hs-comment">-- See Note [DataCon user type variable binders]</span><span>
</span><span id="line-1108"></span><span class="hs-comment">-- | The type variables of the constructor, in the order the user wrote them</span><span>
</span><span id="line-1109"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConUserTyVars"><span class="hs-identifier hs-type">dataConUserTyVars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#TyVar"><span class="hs-identifier hs-type">TyVar</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1110"></span><span id="dataConUserTyVars"><span class="annot"><span class="annottext">dataConUserTyVars :: DataCon -&gt; [TyVar]
</span><a href="GHC.Core.DataCon.html#dataConUserTyVars"><span class="hs-identifier hs-var hs-var">dataConUserTyVars</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#MkData"><span class="hs-identifier hs-type">MkData</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dcUserTyVarBinders :: DataCon -&gt; [InvisTVBinder]
</span><a href="GHC.Core.DataCon.html#dcUserTyVarBinders"><span class="hs-identifier hs-var">dcUserTyVarBinders</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822595"><span class="annot"><span class="annottext">[InvisTVBinder]
</span><a href="#local-6989586621680822595"><span class="hs-identifier hs-var">tvbs</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[InvisTVBinder] -&gt; [TyVar]
forall tv argf. [VarBndr tv argf] -&gt; [tv]
</span><a href="GHC.Types.Var.html#binderVars"><span class="hs-identifier hs-var">binderVars</span></a></span><span> </span><span class="annot"><span class="annottext">[InvisTVBinder]
</span><a href="#local-6989586621680822595"><span class="hs-identifier hs-var">tvbs</span></a></span><span>
</span><span id="line-1111"></span><span>
</span><span id="line-1112"></span><span class="hs-comment">-- See Note [DataCon user type variable binders]</span><span>
</span><span id="line-1113"></span><span class="hs-comment">-- | 'InvisTVBinder's for the type variables of the constructor, in the order the</span><span>
</span><span id="line-1114"></span><span class="hs-comment">-- user wrote them</span><span>
</span><span id="line-1115"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConUserTyVarBinders"><span class="hs-identifier hs-type">dataConUserTyVarBinders</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#InvisTVBinder"><span class="hs-identifier hs-type">InvisTVBinder</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1116"></span><span id="dataConUserTyVarBinders"><span class="annot"><span class="annottext">dataConUserTyVarBinders :: DataCon -&gt; [InvisTVBinder]
</span><a href="GHC.Core.DataCon.html#dataConUserTyVarBinders"><span class="hs-identifier hs-var hs-var">dataConUserTyVarBinders</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; [InvisTVBinder]
</span><a href="GHC.Core.DataCon.html#dcUserTyVarBinders"><span class="hs-identifier hs-var hs-var">dcUserTyVarBinders</span></a></span><span>
</span><span id="line-1117"></span><span>
</span><span id="line-1118"></span><span class="hs-comment">-- | Equalities derived from the result type of the data constructor, as written</span><span>
</span><span id="line-1119"></span><span class="hs-comment">-- by the programmer in any GADT declaration. This includes *all* GADT-like</span><span>
</span><span id="line-1120"></span><span class="hs-comment">-- equalities, including those written in by hand by the programmer.</span><span>
</span><span id="line-1121"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConEqSpec"><span class="hs-identifier hs-type">dataConEqSpec</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.DataCon.html#EqSpec"><span class="hs-identifier hs-type">EqSpec</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1122"></span><span id="dataConEqSpec"><span class="annot"><span class="annottext">dataConEqSpec :: DataCon -&gt; [EqSpec]
</span><a href="GHC.Core.DataCon.html#dataConEqSpec"><span class="hs-identifier hs-var hs-var">dataConEqSpec</span></a></span></span><span> </span><span id="local-6989586621680822593"><span class="annot"><span class="annottext">con :: DataCon
</span><a href="#local-6989586621680822593"><span class="hs-identifier hs-var">con</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#MkData"><span class="hs-identifier hs-type">MkData</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dcEqSpec :: DataCon -&gt; [EqSpec]
</span><a href="GHC.Core.DataCon.html#dcEqSpec"><span class="hs-identifier hs-var">dcEqSpec</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822592"><span class="annot"><span class="annottext">[EqSpec]
</span><a href="#local-6989586621680822592"><span class="hs-identifier hs-var">eq_spec</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dcOtherTheta :: DataCon -&gt; [Type]
</span><a href="GHC.Core.DataCon.html#dcOtherTheta"><span class="hs-identifier hs-var">dcOtherTheta</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822591"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822591"><span class="hs-identifier hs-var">theta</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-1123"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; [EqSpec]
</span><a href="GHC.Core.DataCon.html#dataConKindEqSpec"><span class="hs-identifier hs-var">dataConKindEqSpec</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822593"><span class="hs-identifier hs-var">con</span></a></span><span>
</span><span id="line-1124"></span><span>    </span><span class="annot"><span class="annottext">[EqSpec] -&gt; [EqSpec] -&gt; [EqSpec]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[EqSpec]
</span><a href="#local-6989586621680822592"><span class="hs-identifier hs-var">eq_spec</span></a></span><span> </span><span class="annot"><span class="annottext">[EqSpec] -&gt; [EqSpec] -&gt; [EqSpec]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-1125"></span><span>    </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">EqSpec
</span><a href="#local-6989586621680822589"><span class="hs-identifier hs-var">spec</span></a></span><span>   </span><span class="hs-comment">-- heterogeneous equality</span><span>
</span><span id="line-1126"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680822588"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680822588"><span class="hs-identifier hs-var">tc</span></a></span></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span id="local-6989586621680822587"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822587"><span class="hs-identifier hs-var">_k1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680822586"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822586"><span class="hs-identifier hs-var">_k2</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680822585"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822585"><span class="hs-identifier hs-var">ty1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680822584"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822584"><span class="hs-identifier hs-var">ty2</span></a></span></span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(Type -&gt; Maybe (TyCon, [Type]))
-&gt; [Type] -&gt; [Maybe (TyCon, [Type])]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Type -&gt; Maybe (TyCon, [Type])
Type -&gt; Maybe (TyCon, [Type])
</span><a href="GHC.Core.Type.html#splitTyConApp_maybe"><span class="hs-identifier hs-var">splitTyConApp_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822591"><span class="hs-identifier hs-var">theta</span></a></span><span>
</span><span id="line-1127"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680822588"><span class="hs-identifier hs-var">tc</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Unique -&gt; Bool
forall a. Uniquable a =&gt; a -&gt; Unique -&gt; Bool
</span><a href="GHC.Types.Unique.html#hasKey"><span class="hs-operator hs-var">`hasKey`</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#heqTyConKey"><span class="hs-identifier hs-var">heqTyConKey</span></a></span><span>
</span><span id="line-1128"></span><span>    </span><span class="hs-special">,</span><span> </span><span id="local-6989586621680822589"><span class="annot"><span class="annottext">EqSpec
</span><a href="#local-6989586621680822589"><span class="hs-identifier hs-var">spec</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; Maybe TyVar
</span><a href="GHC.Core.Type.html#getTyVar_maybe"><span class="hs-identifier hs-var">getTyVar_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822585"><span class="hs-identifier hs-var">ty1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type -&gt; Maybe TyVar
</span><a href="GHC.Core.Type.html#getTyVar_maybe"><span class="hs-identifier hs-var">getTyVar_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822584"><span class="hs-identifier hs-var">ty2</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1129"></span><span>                    </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680822579"><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822579"><span class="hs-identifier hs-var">tv1</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe TyVar
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">TyVar -&gt; Type -&gt; EqSpec
</span><a href="GHC.Core.DataCon.html#mkEqSpec"><span class="hs-identifier hs-var">mkEqSpec</span></a></span><span> </span><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822579"><span class="hs-identifier hs-var">tv1</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822584"><span class="hs-identifier hs-var">ty2</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1130"></span><span>                    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe TyVar
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680822578"><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822578"><span class="hs-identifier hs-var">tv2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">TyVar -&gt; Type -&gt; EqSpec
</span><a href="GHC.Core.DataCon.html#mkEqSpec"><span class="hs-identifier hs-var">mkEqSpec</span></a></span><span> </span><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822578"><span class="hs-identifier hs-var">tv2</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822585"><span class="hs-identifier hs-var">ty1</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1131"></span><span>                    </span><span class="annot"><span class="annottext">(Maybe TyVar, Maybe TyVar)
</span><span class="hs-identifier">_</span></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-1132"></span><span>    </span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[EqSpec] -&gt; [EqSpec] -&gt; [EqSpec]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-1133"></span><span>    </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">EqSpec
</span><a href="#local-6989586621680822577"><span class="hs-identifier hs-var">spec</span></a></span><span>   </span><span class="hs-comment">-- homogeneous equality</span><span>
</span><span id="line-1134"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680822576"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680822576"><span class="hs-identifier hs-var">tc</span></a></span></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span id="local-6989586621680822575"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822575"><span class="hs-identifier hs-var">_k</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680822574"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822574"><span class="hs-identifier hs-var">ty1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680822573"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822573"><span class="hs-identifier hs-var">ty2</span></a></span></span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(Type -&gt; Maybe (TyCon, [Type]))
-&gt; [Type] -&gt; [Maybe (TyCon, [Type])]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Type -&gt; Maybe (TyCon, [Type])
Type -&gt; Maybe (TyCon, [Type])
</span><a href="GHC.Core.Type.html#splitTyConApp_maybe"><span class="hs-identifier hs-var">splitTyConApp_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822591"><span class="hs-identifier hs-var">theta</span></a></span><span>
</span><span id="line-1135"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680822576"><span class="hs-identifier hs-var">tc</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Unique -&gt; Bool
forall a. Uniquable a =&gt; a -&gt; Unique -&gt; Bool
</span><a href="GHC.Types.Unique.html#hasKey"><span class="hs-operator hs-var">`hasKey`</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#eqTyConKey"><span class="hs-identifier hs-var">eqTyConKey</span></a></span><span>
</span><span id="line-1136"></span><span>    </span><span class="hs-special">,</span><span> </span><span id="local-6989586621680822577"><span class="annot"><span class="annottext">EqSpec
</span><a href="#local-6989586621680822577"><span class="hs-identifier hs-var">spec</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; Maybe TyVar
</span><a href="GHC.Core.Type.html#getTyVar_maybe"><span class="hs-identifier hs-var">getTyVar_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822574"><span class="hs-identifier hs-var">ty1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type -&gt; Maybe TyVar
</span><a href="GHC.Core.Type.html#getTyVar_maybe"><span class="hs-identifier hs-var">getTyVar_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822573"><span class="hs-identifier hs-var">ty2</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1137"></span><span>                    </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680822571"><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822571"><span class="hs-identifier hs-var">tv1</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe TyVar
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">TyVar -&gt; Type -&gt; EqSpec
</span><a href="GHC.Core.DataCon.html#mkEqSpec"><span class="hs-identifier hs-var">mkEqSpec</span></a></span><span> </span><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822571"><span class="hs-identifier hs-var">tv1</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822573"><span class="hs-identifier hs-var">ty2</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1138"></span><span>                    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe TyVar
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680822570"><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822570"><span class="hs-identifier hs-var">tv2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">TyVar -&gt; Type -&gt; EqSpec
</span><a href="GHC.Core.DataCon.html#mkEqSpec"><span class="hs-identifier hs-var">mkEqSpec</span></a></span><span> </span><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822570"><span class="hs-identifier hs-var">tv2</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822574"><span class="hs-identifier hs-var">ty1</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1139"></span><span>                    </span><span class="annot"><span class="annottext">(Maybe TyVar, Maybe TyVar)
</span><span class="hs-identifier">_</span></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-1140"></span><span>    </span><span class="hs-special">]</span><span>
</span><span id="line-1141"></span><span>
</span><span id="line-1142"></span><span class="hs-comment">-- | Dependent (kind-level) equalities in a constructor.</span><span>
</span><span id="line-1143"></span><span class="hs-comment">-- There are extracted from the existential variables.</span><span>
</span><span id="line-1144"></span><span class="hs-comment">-- See Note [Existential coercion variables]</span><span>
</span><span id="line-1145"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConKindEqSpec"><span class="hs-identifier hs-type">dataConKindEqSpec</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.DataCon.html#EqSpec"><span class="hs-identifier hs-type">EqSpec</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1146"></span><span id="dataConKindEqSpec"><span class="annot"><span class="annottext">dataConKindEqSpec :: DataCon -&gt; [EqSpec]
</span><a href="GHC.Core.DataCon.html#dataConKindEqSpec"><span class="hs-identifier hs-var hs-var">dataConKindEqSpec</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#MkData"><span class="hs-identifier hs-type">MkData</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">dcExTyCoVars :: DataCon -&gt; [TyVar]
</span><a href="GHC.Core.DataCon.html#dcExTyCoVars"><span class="hs-identifier hs-var">dcExTyCoVars</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822569"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822569"><span class="hs-identifier hs-var">ex_tcvs</span></a></span></span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-1147"></span><span>  </span><span class="hs-comment">-- It is used in 'dataConEqSpec' (maybe also 'dataConFullSig' in the future),</span><span>
</span><span id="line-1148"></span><span>  </span><span class="hs-comment">-- which are frequently used functions.</span><span>
</span><span id="line-1149"></span><span>  </span><span class="hs-comment">-- For now (Aug 2018) this function always return empty set as we don't really</span><span>
</span><span id="line-1150"></span><span>  </span><span class="hs-comment">-- have coercion variables.</span><span>
</span><span id="line-1151"></span><span>  </span><span class="hs-comment">-- In the future when we do, we might want to cache this information in DataCon</span><span>
</span><span id="line-1152"></span><span>  </span><span class="hs-comment">-- so it won't be computed every time when aforementioned functions are called.</span><span>
</span><span id="line-1153"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">TyVar -&gt; Type -&gt; EqSpec
</span><a href="GHC.Core.DataCon.html#EqSpec"><span class="hs-identifier hs-var">EqSpec</span></a></span><span> </span><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822568"><span class="hs-identifier hs-var">tv</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822567"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-1154"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621680822566"><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822566"><span class="hs-identifier hs-var">cv</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822569"><span class="hs-identifier hs-var">ex_tcvs</span></a></span><span>
</span><span id="line-1155"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">TyVar -&gt; Bool
</span><a href="GHC.Types.Var.html#isCoVar"><span class="hs-identifier hs-var">isCoVar</span></a></span><span> </span><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822566"><span class="hs-identifier hs-var">cv</span></a></span><span>
</span><span id="line-1156"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680822564"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822564"><span class="hs-identifier hs-var">ty1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680822567"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822567"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Role
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; TyVar -&gt; (Type, Type, Type, Type, Role)
TyVar -&gt; (Type, Type, Type, Type, Role)
</span><a href="GHC.Core.Coercion.html#coVarKindsTypesRole"><span class="hs-identifier hs-var">coVarKindsTypesRole</span></a></span><span> </span><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822566"><span class="hs-identifier hs-var">cv</span></a></span><span>
</span><span id="line-1157"></span><span>          </span><span id="local-6989586621680822568"><span class="annot"><span class="annottext">tv :: TyVar
</span><a href="#local-6989586621680822568"><span class="hs-identifier hs-var hs-var">tv</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Type -&gt; TyVar
</span><a href="GHC.Core.Type.html#getTyVar"><span class="hs-identifier hs-var">getTyVar</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dataConKindEqSpec&quot;</span></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822564"><span class="hs-identifier hs-var">ty1</span></a></span><span>
</span><span id="line-1158"></span><span>    </span><span class="hs-special">]</span><span>
</span><span id="line-1159"></span><span>
</span><span id="line-1160"></span><span class="hs-comment">-- | The *full* constraints on the constructor type, including dependent GADT</span><span>
</span><span id="line-1161"></span><span class="hs-comment">-- equalities.</span><span>
</span><span id="line-1162"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConTheta"><span class="hs-identifier hs-type">dataConTheta</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#ThetaType"><span class="hs-identifier hs-type">ThetaType</span></a></span><span>
</span><span id="line-1163"></span><span id="dataConTheta"><span class="annot"><span class="annottext">dataConTheta :: DataCon -&gt; [Type]
</span><a href="GHC.Core.DataCon.html#dataConTheta"><span class="hs-identifier hs-var hs-var">dataConTheta</span></a></span></span><span> </span><span id="local-6989586621680822562"><span class="annot"><span class="annottext">con :: DataCon
</span><a href="#local-6989586621680822562"><span class="hs-identifier hs-var">con</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#MkData"><span class="hs-identifier hs-type">MkData</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dcEqSpec :: DataCon -&gt; [EqSpec]
</span><a href="GHC.Core.DataCon.html#dcEqSpec"><span class="hs-identifier hs-var">dcEqSpec</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822561"><span class="annot"><span class="annottext">[EqSpec]
</span><a href="#local-6989586621680822561"><span class="hs-identifier hs-var">eq_spec</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dcOtherTheta :: DataCon -&gt; [Type]
</span><a href="GHC.Core.DataCon.html#dcOtherTheta"><span class="hs-identifier hs-var">dcOtherTheta</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822560"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822560"><span class="hs-identifier hs-var">theta</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-1164"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[EqSpec] -&gt; [Type]
</span><a href="GHC.Core.DataCon.html#eqSpecPreds"><span class="hs-identifier hs-var">eqSpecPreds</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; [EqSpec]
</span><a href="GHC.Core.DataCon.html#dataConKindEqSpec"><span class="hs-identifier hs-var">dataConKindEqSpec</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822562"><span class="hs-identifier hs-var">con</span></a></span><span> </span><span class="annot"><span class="annottext">[EqSpec] -&gt; [EqSpec] -&gt; [EqSpec]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[EqSpec]
</span><a href="#local-6989586621680822561"><span class="hs-identifier hs-var">eq_spec</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Type] -&gt; [Type] -&gt; [Type]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822560"><span class="hs-identifier hs-var">theta</span></a></span><span>
</span><span id="line-1165"></span><span>
</span><span id="line-1166"></span><span class="hs-comment">-- | Get the Id of the 'DataCon' worker: a function that is the &quot;actual&quot;</span><span>
</span><span id="line-1167"></span><span class="hs-comment">-- constructor and has no top level binding in the program. The type may</span><span>
</span><span id="line-1168"></span><span class="hs-comment">-- be different from the obvious one written in the source program. Panics</span><span>
</span><span id="line-1169"></span><span class="hs-comment">-- if there is no such 'Id' for this 'DataCon'</span><span>
</span><span id="line-1170"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConWorkId"><span class="hs-identifier hs-type">dataConWorkId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-1171"></span><span id="dataConWorkId"><span class="annot"><span class="annottext">dataConWorkId :: DataCon -&gt; TyVar
</span><a href="GHC.Core.DataCon.html#dataConWorkId"><span class="hs-identifier hs-var hs-var">dataConWorkId</span></a></span></span><span> </span><span id="local-6989586621680822559"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822559"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; TyVar
</span><a href="GHC.Core.DataCon.html#dcWorkId"><span class="hs-identifier hs-var hs-var">dcWorkId</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822559"><span class="hs-identifier hs-var">dc</span></a></span><span>
</span><span id="line-1172"></span><span>
</span><span id="line-1173"></span><span class="hs-comment">-- | Get the Id of the 'DataCon' wrapper: a function that wraps the &quot;actual&quot;</span><span>
</span><span id="line-1174"></span><span class="hs-comment">-- constructor so it has the type visible in the source program: c.f.</span><span>
</span><span id="line-1175"></span><span class="hs-comment">-- 'dataConWorkId'.</span><span>
</span><span id="line-1176"></span><span class="hs-comment">-- Returns Nothing if there is no wrapper, which occurs for an algebraic data</span><span>
</span><span id="line-1177"></span><span class="hs-comment">-- constructor and also for a newtype (whose constructor is inlined</span><span>
</span><span id="line-1178"></span><span class="hs-comment">-- compulsorily)</span><span>
</span><span id="line-1179"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConWrapId_maybe"><span class="hs-identifier hs-type">dataConWrapId_maybe</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-1180"></span><span id="dataConWrapId_maybe"><span class="annot"><span class="annottext">dataConWrapId_maybe :: DataCon -&gt; Maybe TyVar
</span><a href="GHC.Core.DataCon.html#dataConWrapId_maybe"><span class="hs-identifier hs-var hs-var">dataConWrapId_maybe</span></a></span></span><span> </span><span id="local-6989586621680822558"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822558"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; DataConRep
</span><a href="GHC.Core.DataCon.html#dcRep"><span class="hs-identifier hs-var hs-var">dcRep</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822558"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1181"></span><span>                           </span><span class="annot"><span class="annottext">DataConRep
</span><a href="GHC.Core.DataCon.html#NoDataConRep"><span class="hs-identifier hs-var">NoDataConRep</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe TyVar
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-1182"></span><span>                           </span><span class="annot"><a href="GHC.Core.DataCon.html#DCR"><span class="hs-identifier hs-type">DCR</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dcr_wrap_id :: DataConRep -&gt; TyVar
</span><a href="GHC.Core.DataCon.html#dcr_wrap_id"><span class="hs-identifier hs-var">dcr_wrap_id</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822557"><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822557"><span class="hs-identifier hs-var">wrap_id</span></a></span></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">TyVar -&gt; Maybe TyVar
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822557"><span class="hs-identifier hs-var">wrap_id</span></a></span><span>
</span><span id="line-1183"></span><span>
</span><span id="line-1184"></span><span class="hs-comment">-- | Returns an Id which looks like the Haskell-source constructor by using</span><span>
</span><span id="line-1185"></span><span class="hs-comment">-- the wrapper if it exists (see 'dataConWrapId_maybe') and failing over to</span><span>
</span><span id="line-1186"></span><span class="hs-comment">-- the worker (see 'dataConWorkId')</span><span>
</span><span id="line-1187"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConWrapId"><span class="hs-identifier hs-type">dataConWrapId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-1188"></span><span id="dataConWrapId"><span class="annot"><span class="annottext">dataConWrapId :: DataCon -&gt; TyVar
</span><a href="GHC.Core.DataCon.html#dataConWrapId"><span class="hs-identifier hs-var hs-var">dataConWrapId</span></a></span></span><span> </span><span id="local-6989586621680822556"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822556"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; DataConRep
</span><a href="GHC.Core.DataCon.html#dcRep"><span class="hs-identifier hs-var hs-var">dcRep</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822556"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1189"></span><span>                     </span><span class="annot"><span class="annottext">DataConRep
</span><a href="GHC.Core.DataCon.html#NoDataConRep"><span class="hs-identifier hs-var">NoDataConRep</span></a></span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; TyVar
</span><a href="GHC.Core.DataCon.html#dcWorkId"><span class="hs-identifier hs-var hs-var">dcWorkId</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822556"><span class="hs-identifier hs-var">dc</span></a></span><span>    </span><span class="hs-comment">-- worker=wrapper</span><span>
</span><span id="line-1190"></span><span>                     </span><span class="annot"><a href="GHC.Core.DataCon.html#DCR"><span class="hs-identifier hs-type">DCR</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dcr_wrap_id :: DataConRep -&gt; TyVar
</span><a href="GHC.Core.DataCon.html#dcr_wrap_id"><span class="hs-identifier hs-var">dcr_wrap_id</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822555"><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822555"><span class="hs-identifier hs-var">wrap_id</span></a></span></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822555"><span class="hs-identifier hs-var">wrap_id</span></a></span><span>
</span><span id="line-1191"></span><span>
</span><span id="line-1192"></span><span class="hs-comment">-- | Find all the 'Id's implicitly brought into scope by the data constructor. Currently,</span><span>
</span><span id="line-1193"></span><span class="hs-comment">-- the union of the 'dataConWorkId' and the 'dataConWrapId'</span><span>
</span><span id="line-1194"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConImplicitTyThings"><span class="hs-identifier hs-type">dataConImplicitTyThings</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#TyThing"><span class="hs-identifier hs-type">TyThing</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1195"></span><span id="dataConImplicitTyThings"><span class="annot"><span class="annottext">dataConImplicitTyThings :: DataCon -&gt; [TyThing]
</span><a href="GHC.Core.DataCon.html#dataConImplicitTyThings"><span class="hs-identifier hs-var hs-var">dataConImplicitTyThings</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#MkData"><span class="hs-identifier hs-type">MkData</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dcWorkId :: DataCon -&gt; TyVar
</span><a href="GHC.Core.DataCon.html#dcWorkId"><span class="hs-identifier hs-var">dcWorkId</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822554"><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822554"><span class="hs-identifier hs-var">work</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dcRep :: DataCon -&gt; DataConRep
</span><a href="GHC.Core.DataCon.html#dcRep"><span class="hs-identifier hs-var">dcRep</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822553"><span class="annot"><span class="annottext">DataConRep
</span><a href="#local-6989586621680822553"><span class="hs-identifier hs-var">rep</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-1196"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">TyVar -&gt; TyThing
</span><a href="GHC.Core.TyCo.Rep.html#AnId"><span class="hs-identifier hs-var">AnId</span></a></span><span> </span><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822554"><span class="hs-identifier hs-var">work</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[TyThing] -&gt; [TyThing] -&gt; [TyThing]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[TyThing]
</span><a href="#local-6989586621680822551"><span class="hs-identifier hs-var">wrap_ids</span></a></span><span>
</span><span id="line-1197"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1198"></span><span>    </span><span id="local-6989586621680822551"><span class="annot"><span class="annottext">wrap_ids :: [TyThing]
</span><a href="#local-6989586621680822551"><span class="hs-identifier hs-var hs-var">wrap_ids</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">DataConRep
</span><a href="#local-6989586621680822553"><span class="hs-identifier hs-var">rep</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1199"></span><span>                 </span><span class="annot"><span class="annottext">DataConRep
</span><a href="GHC.Core.DataCon.html#NoDataConRep"><span class="hs-identifier hs-var">NoDataConRep</span></a></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-1200"></span><span>                 </span><span class="annot"><a href="GHC.Core.DataCon.html#DCR"><span class="hs-identifier hs-type">DCR</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dcr_wrap_id :: DataConRep -&gt; TyVar
</span><a href="GHC.Core.DataCon.html#dcr_wrap_id"><span class="hs-identifier hs-var">dcr_wrap_id</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822550"><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822550"><span class="hs-identifier hs-var">wrap</span></a></span></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">TyVar -&gt; TyThing
</span><a href="GHC.Core.TyCo.Rep.html#AnId"><span class="hs-identifier hs-var">AnId</span></a></span><span> </span><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680822550"><span class="hs-identifier hs-var">wrap</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1201"></span><span>
</span><span id="line-1202"></span><span class="hs-comment">-- | The labels for the fields of this particular 'DataCon'</span><span>
</span><span id="line-1203"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConFieldLabels"><span class="hs-identifier hs-type">dataConFieldLabels</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.FieldLabel.html#FieldLabel"><span class="hs-identifier hs-type">FieldLabel</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1204"></span><span id="dataConFieldLabels"><span class="annot"><span class="annottext">dataConFieldLabels :: DataCon -&gt; [FieldLabel]
</span><a href="GHC.Core.DataCon.html#dataConFieldLabels"><span class="hs-identifier hs-var hs-var">dataConFieldLabels</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; [FieldLabel]
</span><a href="GHC.Core.DataCon.html#dcFields"><span class="hs-identifier hs-var hs-var">dcFields</span></a></span><span>
</span><span id="line-1205"></span><span>
</span><span id="line-1206"></span><span class="hs-comment">-- | Extract the type for any given labelled field of the 'DataCon'</span><span>
</span><span id="line-1207"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConFieldType"><span class="hs-identifier hs-type">dataConFieldType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.FieldLabel.html#FieldLabelString"><span class="hs-identifier hs-type">FieldLabelString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span>
</span><span id="line-1208"></span><span id="dataConFieldType"><span class="annot"><span class="annottext">dataConFieldType :: DataCon -&gt; FieldLabelString -&gt; Type
</span><a href="GHC.Core.DataCon.html#dataConFieldType"><span class="hs-identifier hs-var hs-var">dataConFieldType</span></a></span></span><span> </span><span id="local-6989586621680822549"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822549"><span class="hs-identifier hs-var">con</span></a></span></span><span> </span><span id="local-6989586621680822548"><span class="annot"><span class="annottext">FieldLabelString
</span><a href="#local-6989586621680822548"><span class="hs-keyword hs-var">label</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; FieldLabelString -&gt; Maybe (FieldLabel, Type)
</span><a href="GHC.Core.DataCon.html#dataConFieldType_maybe"><span class="hs-identifier hs-var">dataConFieldType_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822549"><span class="hs-identifier hs-var">con</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLabelString
</span><a href="#local-6989586621680822548"><span class="hs-keyword hs-var">label</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1209"></span><span>      </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldLabel
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680822547"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822547"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822547"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-1210"></span><span>      </span><span class="annot"><span class="annottext">Maybe (FieldLabel, Type)
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; Type
forall a. HasCallStack =&gt; String -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dataConFieldType&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822549"><span class="hs-identifier hs-var">con</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLabelString -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLabelString
</span><a href="#local-6989586621680822548"><span class="hs-keyword hs-var">label</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1211"></span><span>
</span><span id="line-1212"></span><span class="hs-comment">-- | Extract the label and type for any given labelled field of the</span><span>
</span><span id="line-1213"></span><span class="hs-comment">-- 'DataCon', or return 'Nothing' if the field does not belong to it</span><span>
</span><span id="line-1214"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConFieldType_maybe"><span class="hs-identifier hs-type">dataConFieldType_maybe</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.FieldLabel.html#FieldLabelString"><span class="hs-identifier hs-type">FieldLabelString</span></a></span><span>
</span><span id="line-1215"></span><span>                       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.FieldLabel.html#FieldLabel"><span class="hs-identifier hs-type">FieldLabel</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1216"></span><span id="dataConFieldType_maybe"><span class="annot"><span class="annottext">dataConFieldType_maybe :: DataCon -&gt; FieldLabelString -&gt; Maybe (FieldLabel, Type)
</span><a href="GHC.Core.DataCon.html#dataConFieldType_maybe"><span class="hs-identifier hs-var hs-var">dataConFieldType_maybe</span></a></span></span><span> </span><span id="local-6989586621680822545"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822545"><span class="hs-identifier hs-var">con</span></a></span></span><span> </span><span id="local-6989586621680822544"><span class="annot"><span class="annottext">FieldLabelString
</span><a href="#local-6989586621680822544"><span class="hs-keyword hs-var">label</span></a></span></span><span>
</span><span id="line-1217"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((FieldLabel, Type) -&gt; Bool)
-&gt; [(FieldLabel, Type)] -&gt; Maybe (FieldLabel, Type)
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Maybe a
</span><a href="../../base/src/Data.Foldable.html#find"><span class="hs-identifier hs-var">find</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldLabelString -&gt; FieldLabelString -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">FieldLabelString
</span><a href="#local-6989586621680822544"><span class="hs-keyword hs-var">label</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(FieldLabelString -&gt; Bool)
-&gt; ((FieldLabel, Type) -&gt; FieldLabelString)
-&gt; (FieldLabel, Type)
-&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLabel -&gt; FieldLabelString
forall a. FieldLbl a -&gt; FieldLabelString
</span><a href="GHC.Types.FieldLabel.html#flLabel"><span class="hs-identifier hs-var hs-var">flLabel</span></a></span><span> </span><span class="annot"><span class="annottext">(FieldLabel -&gt; FieldLabelString)
-&gt; ((FieldLabel, Type) -&gt; FieldLabel)
-&gt; (FieldLabel, Type)
-&gt; FieldLabelString
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(FieldLabel, Type) -&gt; FieldLabel
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; [FieldLabel]
</span><a href="GHC.Core.DataCon.html#dcFields"><span class="hs-identifier hs-var hs-var">dcFields</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822545"><span class="hs-identifier hs-var">con</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLabel] -&gt; [Type] -&gt; [(FieldLabel, Type)]
forall a b. [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="../../base/src/GHC.List.html#zip"><span class="hs-operator hs-var">`zip`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Scaled Type -&gt; Type
forall a. Scaled a -&gt; a
</span><a href="GHC.Core.TyCo.Rep.html#scaledThing"><span class="hs-identifier hs-var">scaledThing</span></a></span><span> </span><span class="annot"><span class="annottext">(Scaled Type -&gt; Type) -&gt; [Scaled Type] -&gt; [Type]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; [Scaled Type]
</span><a href="GHC.Core.DataCon.html#dcOrigArgTys"><span class="hs-identifier hs-var hs-var">dcOrigArgTys</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822545"><span class="hs-identifier hs-var">con</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1218"></span><span>
</span><span id="line-1219"></span><span class="hs-comment">-- | Strictness/unpack annotations, from user; or, for imported</span><span>
</span><span id="line-1220"></span><span class="hs-comment">-- DataCons, from the interface file</span><span>
</span><span id="line-1221"></span><span class="hs-comment">-- The list is in one-to-one correspondence with the arity of the 'DataCon'</span><span>
</span><span id="line-1222"></span><span>
</span><span id="line-1223"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConSrcBangs"><span class="hs-identifier hs-type">dataConSrcBangs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.DataCon.html#HsSrcBang"><span class="hs-identifier hs-type">HsSrcBang</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1224"></span><span id="dataConSrcBangs"><span class="annot"><span class="annottext">dataConSrcBangs :: DataCon -&gt; [HsSrcBang]
</span><a href="GHC.Core.DataCon.html#dataConSrcBangs"><span class="hs-identifier hs-var hs-var">dataConSrcBangs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; [HsSrcBang]
</span><a href="GHC.Core.DataCon.html#dcSrcBangs"><span class="hs-identifier hs-var hs-var">dcSrcBangs</span></a></span><span>
</span><span id="line-1225"></span><span>
</span><span id="line-1226"></span><span class="hs-comment">-- | Source-level arity of the data constructor</span><span>
</span><span id="line-1227"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConSourceArity"><span class="hs-identifier hs-type">dataConSourceArity</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Arity"><span class="hs-identifier hs-type">Arity</span></a></span><span>
</span><span id="line-1228"></span><span id="dataConSourceArity"><span class="annot"><span class="annottext">dataConSourceArity :: DataCon -&gt; Arity
</span><a href="GHC.Core.DataCon.html#dataConSourceArity"><span class="hs-identifier hs-var hs-var">dataConSourceArity</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#MkData"><span class="hs-identifier hs-type">MkData</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dcSourceArity :: DataCon -&gt; Arity
</span><a href="GHC.Core.DataCon.html#dcSourceArity"><span class="hs-identifier hs-var">dcSourceArity</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822541"><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680822541"><span class="hs-identifier hs-var">arity</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680822541"><span class="hs-identifier hs-var">arity</span></a></span><span>
</span><span id="line-1229"></span><span>
</span><span id="line-1230"></span><span class="hs-comment">-- | Gives the number of actual fields in the /representation/ of the</span><span>
</span><span id="line-1231"></span><span class="hs-comment">-- data constructor. This may be more than appear in the source code;</span><span>
</span><span id="line-1232"></span><span class="hs-comment">-- the extra ones are the existentially quantified dictionaries</span><span>
</span><span id="line-1233"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConRepArity"><span class="hs-identifier hs-type">dataConRepArity</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Arity"><span class="hs-identifier hs-type">Arity</span></a></span><span>
</span><span id="line-1234"></span><span id="dataConRepArity"><span class="annot"><span class="annottext">dataConRepArity :: DataCon -&gt; Arity
</span><a href="GHC.Core.DataCon.html#dataConRepArity"><span class="hs-identifier hs-var hs-var">dataConRepArity</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#MkData"><span class="hs-identifier hs-type">MkData</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dcRepArity :: DataCon -&gt; Arity
</span><a href="GHC.Core.DataCon.html#dcRepArity"><span class="hs-identifier hs-var">dcRepArity</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822540"><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680822540"><span class="hs-identifier hs-var">arity</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680822540"><span class="hs-identifier hs-var">arity</span></a></span><span>
</span><span id="line-1235"></span><span>
</span><span id="line-1236"></span><span class="hs-comment">-- | Return whether there are any argument types for this 'DataCon's original source type</span><span>
</span><span id="line-1237"></span><span class="hs-comment">-- See Note [DataCon arities]</span><span>
</span><span id="line-1238"></span><span class="annot"><a href="GHC.Core.DataCon.html#isNullarySrcDataCon"><span class="hs-identifier hs-type">isNullarySrcDataCon</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-1239"></span><span id="isNullarySrcDataCon"><span class="annot"><span class="annottext">isNullarySrcDataCon :: DataCon -&gt; Bool
</span><a href="GHC.Core.DataCon.html#isNullarySrcDataCon"><span class="hs-identifier hs-var hs-var">isNullarySrcDataCon</span></a></span></span><span> </span><span id="local-6989586621680822539"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822539"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Arity
</span><a href="GHC.Core.DataCon.html#dataConSourceArity"><span class="hs-identifier hs-var">dataConSourceArity</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822539"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">Arity -&gt; Arity -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Arity
</span><span class="hs-number">0</span></span><span>
</span><span id="line-1240"></span><span>
</span><span id="line-1241"></span><span class="hs-comment">-- | Return whether there are any argument types for this 'DataCon's runtime representation type</span><span>
</span><span id="line-1242"></span><span class="hs-comment">-- See Note [DataCon arities]</span><span>
</span><span id="line-1243"></span><span class="annot"><a href="GHC.Core.DataCon.html#isNullaryRepDataCon"><span class="hs-identifier hs-type">isNullaryRepDataCon</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-1244"></span><span id="isNullaryRepDataCon"><span class="annot"><span class="annottext">isNullaryRepDataCon :: DataCon -&gt; Bool
</span><a href="GHC.Core.DataCon.html#isNullaryRepDataCon"><span class="hs-identifier hs-var hs-var">isNullaryRepDataCon</span></a></span></span><span> </span><span id="local-6989586621680822538"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822538"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Arity
</span><a href="GHC.Core.DataCon.html#dataConRepArity"><span class="hs-identifier hs-var">dataConRepArity</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822538"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="annot"><span class="annottext">Arity -&gt; Arity -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Arity
</span><span class="hs-number">0</span></span><span>
</span><span id="line-1245"></span><span>
</span><span id="line-1246"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConRepStrictness"><span class="hs-identifier hs-type">dataConRepStrictness</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.DataCon.html#StrictnessMark"><span class="hs-identifier hs-type">StrictnessMark</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1247"></span><span class="hs-comment">-- ^ Give the demands on the arguments of a</span><span>
</span><span id="line-1248"></span><span class="hs-comment">-- Core constructor application (Con dc args)</span><span>
</span><span id="line-1249"></span><span id="dataConRepStrictness"><span class="annot"><span class="annottext">dataConRepStrictness :: DataCon -&gt; [StrictnessMark]
</span><a href="GHC.Core.DataCon.html#dataConRepStrictness"><span class="hs-identifier hs-var hs-var">dataConRepStrictness</span></a></span></span><span> </span><span id="local-6989586621680822537"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822537"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; DataConRep
</span><a href="GHC.Core.DataCon.html#dcRep"><span class="hs-identifier hs-var hs-var">dcRep</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822537"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1250"></span><span>                            </span><span class="annot"><span class="annottext">DataConRep
</span><a href="GHC.Core.DataCon.html#NoDataConRep"><span class="hs-identifier hs-var">NoDataConRep</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">StrictnessMark
</span><a href="GHC.Core.DataCon.html#NotMarkedStrict"><span class="hs-identifier hs-var">NotMarkedStrict</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Scaled Type
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; [Scaled Type]
</span><a href="GHC.Core.DataCon.html#dataConRepArgTys"><span class="hs-identifier hs-var">dataConRepArgTys</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822537"><span class="hs-identifier hs-var">dc</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1251"></span><span>                            </span><span class="annot"><a href="GHC.Core.DataCon.html#DCR"><span class="hs-identifier hs-type">DCR</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dcr_stricts :: DataConRep -&gt; [StrictnessMark]
</span><a href="GHC.Core.DataCon.html#dcr_stricts"><span class="hs-identifier hs-var">dcr_stricts</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822536"><span class="annot"><span class="annottext">[StrictnessMark]
</span><a href="#local-6989586621680822536"><span class="hs-identifier hs-var">strs</span></a></span></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[StrictnessMark]
</span><a href="#local-6989586621680822536"><span class="hs-identifier hs-var">strs</span></a></span><span>
</span><span id="line-1252"></span><span>
</span><span id="line-1253"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConImplBangs"><span class="hs-identifier hs-type">dataConImplBangs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.DataCon.html#HsImplBang"><span class="hs-identifier hs-type">HsImplBang</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1254"></span><span class="hs-comment">-- The implementation decisions about the strictness/unpack of each</span><span>
</span><span id="line-1255"></span><span class="hs-comment">-- source program argument to the data constructor</span><span>
</span><span id="line-1256"></span><span id="dataConImplBangs"><span class="annot"><span class="annottext">dataConImplBangs :: DataCon -&gt; [HsImplBang]
</span><a href="GHC.Core.DataCon.html#dataConImplBangs"><span class="hs-identifier hs-var hs-var">dataConImplBangs</span></a></span></span><span> </span><span id="local-6989586621680822535"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822535"><span class="hs-identifier hs-var">dc</span></a></span></span><span>
</span><span id="line-1257"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; DataConRep
</span><a href="GHC.Core.DataCon.html#dcRep"><span class="hs-identifier hs-var hs-var">dcRep</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822535"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1258"></span><span>      </span><span class="annot"><span class="annottext">DataConRep
</span><a href="GHC.Core.DataCon.html#NoDataConRep"><span class="hs-identifier hs-var">NoDataConRep</span></a></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Arity -&gt; HsImplBang -&gt; [HsImplBang]
forall a. Arity -&gt; a -&gt; [a]
</span><a href="../../base/src/GHC.List.html#replicate"><span class="hs-identifier hs-var">replicate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; Arity
</span><a href="GHC.Core.DataCon.html#dcSourceArity"><span class="hs-identifier hs-var hs-var">dcSourceArity</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822535"><span class="hs-identifier hs-var">dc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">HsImplBang
</span><a href="GHC.Core.DataCon.html#HsLazy"><span class="hs-identifier hs-var">HsLazy</span></a></span><span>
</span><span id="line-1259"></span><span>      </span><span class="annot"><a href="GHC.Core.DataCon.html#DCR"><span class="hs-identifier hs-type">DCR</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dcr_bangs :: DataConRep -&gt; [HsImplBang]
</span><a href="GHC.Core.DataCon.html#dcr_bangs"><span class="hs-identifier hs-var">dcr_bangs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822533"><span class="annot"><span class="annottext">[HsImplBang]
</span><a href="#local-6989586621680822533"><span class="hs-identifier hs-var">bangs</span></a></span></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[HsImplBang]
</span><a href="#local-6989586621680822533"><span class="hs-identifier hs-var">bangs</span></a></span><span>
</span><span id="line-1260"></span><span>
</span><span id="line-1261"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConBoxer"><span class="hs-identifier hs-type">dataConBoxer</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#DataConBoxer"><span class="hs-identifier hs-type">DataConBoxer</span></a></span><span>
</span><span id="line-1262"></span><span id="dataConBoxer"><span class="annot"><span class="annottext">dataConBoxer :: DataCon -&gt; Maybe DataConBoxer
</span><a href="GHC.Core.DataCon.html#dataConBoxer"><span class="hs-identifier hs-var hs-var">dataConBoxer</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#MkData"><span class="hs-identifier hs-type">MkData</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dcRep :: DataCon -&gt; DataConRep
</span><a href="GHC.Core.DataCon.html#dcRep"><span class="hs-identifier hs-var">dcRep</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DCR"><span class="hs-identifier hs-type">DCR</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dcr_boxer :: DataConRep -&gt; DataConBoxer
</span><a href="GHC.Core.DataCon.html#dcr_boxer"><span class="hs-identifier hs-var">dcr_boxer</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822532"><span class="annot"><span class="annottext">DataConBoxer
</span><a href="#local-6989586621680822532"><span class="hs-identifier hs-var">boxer</span></a></span></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataConBoxer -&gt; Maybe DataConBoxer
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">DataConBoxer
</span><a href="#local-6989586621680822532"><span class="hs-identifier hs-var">boxer</span></a></span><span>
</span><span id="line-1263"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConBoxer"><span class="hs-identifier hs-var">dataConBoxer</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe DataConBoxer
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-1264"></span><span>
</span><span id="line-1265"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConInstSig"><span class="hs-identifier hs-type">dataConInstSig</span></a></span><span>
</span><span id="line-1266"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span>
</span><span id="line-1267"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span>    </span><span class="hs-comment">-- Instantiate the *universal* tyvars with these types</span><span>
</span><span id="line-1268"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#TyCoVar"><span class="hs-identifier hs-type">TyCoVar</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#ThetaType"><span class="hs-identifier hs-type">ThetaType</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>  </span><span class="hs-comment">-- Return instantiated existentials</span><span>
</span><span id="line-1269"></span><span>                                     </span><span class="hs-comment">-- theta and arg tys</span><span>
</span><span id="line-1270"></span><span class="hs-comment">-- ^ Instantiate the universal tyvars of a data con,</span><span>
</span><span id="line-1271"></span><span class="hs-comment">--   returning</span><span>
</span><span id="line-1272"></span><span class="hs-comment">--     ( instantiated existentials</span><span>
</span><span id="line-1273"></span><span class="hs-comment">--     , instantiated constraints including dependent GADT equalities</span><span>
</span><span id="line-1274"></span><span class="hs-comment">--         which are *also* listed in the instantiated existentials</span><span>
</span><span id="line-1275"></span><span class="hs-comment">--     , instantiated args)</span><span>
</span><span id="line-1276"></span><span id="dataConInstSig"><span class="annot"><span class="annottext">dataConInstSig :: DataCon -&gt; [Type] -&gt; ([TyVar], [Type], [Type])
</span><a href="GHC.Core.DataCon.html#dataConInstSig"><span class="hs-identifier hs-var hs-var">dataConInstSig</span></a></span></span><span> </span><span id="local-6989586621680822531"><span class="annot"><span class="annottext">con :: DataCon
</span><a href="#local-6989586621680822531"><span class="hs-identifier hs-var">con</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#MkData"><span class="hs-identifier hs-type">MkData</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dcUnivTyVars :: DataCon -&gt; [TyVar]
</span><a href="GHC.Core.DataCon.html#dcUnivTyVars"><span class="hs-identifier hs-var">dcUnivTyVars</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822530"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822530"><span class="hs-identifier hs-var">univ_tvs</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dcExTyCoVars :: DataCon -&gt; [TyVar]
</span><a href="GHC.Core.DataCon.html#dcExTyCoVars"><span class="hs-identifier hs-var">dcExTyCoVars</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822529"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822529"><span class="hs-identifier hs-var">ex_tvs</span></a></span></span><span>
</span><span id="line-1277"></span><span>                           </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dcOrigArgTys :: DataCon -&gt; [Scaled Type]
</span><a href="GHC.Core.DataCon.html#dcOrigArgTys"><span class="hs-identifier hs-var">dcOrigArgTys</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822528"><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680822528"><span class="hs-identifier hs-var">arg_tys</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-1278"></span><span>               </span><span id="local-6989586621680822527"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822527"><span class="hs-identifier hs-var">univ_tys</span></a></span></span><span>
</span><span id="line-1279"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822526"><span class="hs-identifier hs-var">ex_tvs'</span></a></span><span>
</span><span id="line-1280"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">HasCallStack =&gt; TCvSubst -&gt; [Type] -&gt; [Type]
TCvSubst -&gt; [Type] -&gt; [Type]
</span><a href="GHC.Core.TyCo.Subst.html#substTheta"><span class="hs-identifier hs-var">substTheta</span></a></span><span> </span><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680822524"><span class="hs-identifier hs-var">subst</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; [Type]
</span><a href="GHC.Core.DataCon.html#dataConTheta"><span class="hs-identifier hs-var">dataConTheta</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822531"><span class="hs-identifier hs-var">con</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1281"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">HasCallStack =&gt; TCvSubst -&gt; [Type] -&gt; [Type]
TCvSubst -&gt; [Type] -&gt; [Type]
</span><a href="GHC.Core.TyCo.Subst.html#substTys"><span class="hs-identifier hs-var">substTys</span></a></span><span> </span><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680822524"><span class="hs-identifier hs-var">subst</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Scaled Type -&gt; Type) -&gt; [Scaled Type] -&gt; [Type]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Scaled Type -&gt; Type
forall a. Scaled a -&gt; a
</span><a href="GHC.Core.TyCo.Rep.html#scaledThing"><span class="hs-identifier hs-var">scaledThing</span></a></span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680822528"><span class="hs-identifier hs-var">arg_tys</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1282"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1283"></span><span>    </span><span id="local-6989586621680822521"><span class="annot"><span class="annottext">univ_subst :: TCvSubst
</span><a href="#local-6989586621680822521"><span class="hs-identifier hs-var hs-var">univ_subst</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[TyVar] -&gt; [Type] -&gt; TCvSubst
HasDebugCallStack =&gt; [TyVar] -&gt; [Type] -&gt; TCvSubst
</span><a href="GHC.Core.TyCo.Subst.html#zipTvSubst"><span class="hs-identifier hs-var">zipTvSubst</span></a></span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822530"><span class="hs-identifier hs-var">univ_tvs</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822527"><span class="hs-identifier hs-var">univ_tys</span></a></span><span>
</span><span id="line-1284"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680822524"><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680822524"><span class="hs-identifier hs-var">subst</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680822526"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822526"><span class="hs-identifier hs-var">ex_tvs'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HasCallStack =&gt; TCvSubst -&gt; [TyVar] -&gt; (TCvSubst, [TyVar])
TCvSubst -&gt; [TyVar] -&gt; (TCvSubst, [TyVar])
</span><a href="GHC.Core.TyCo.Subst.html#substVarBndrs"><span class="hs-identifier hs-var">Type.substVarBndrs</span></a></span><span> </span><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680822521"><span class="hs-identifier hs-var">univ_subst</span></a></span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822529"><span class="hs-identifier hs-var">ex_tvs</span></a></span><span>
</span><span id="line-1285"></span><span>
</span><span id="line-1286"></span><span>
</span><span id="line-1287"></span><span class="hs-comment">-- | The \&quot;full signature\&quot; of the 'DataCon' returns, in order:</span><span>
</span><span id="line-1288"></span><span class="hs-comment">--</span><span>
</span><span id="line-1289"></span><span class="hs-comment">-- 1) The result of 'dataConUnivTyVars'</span><span>
</span><span id="line-1290"></span><span class="hs-comment">--</span><span>
</span><span id="line-1291"></span><span class="hs-comment">-- 2) The result of 'dataConExTyCoVars'</span><span>
</span><span id="line-1292"></span><span class="hs-comment">--</span><span>
</span><span id="line-1293"></span><span class="hs-comment">-- 3) The non-dependent GADT equalities.</span><span>
</span><span id="line-1294"></span><span class="hs-comment">--    Dependent GADT equalities are implied by coercion variables in</span><span>
</span><span id="line-1295"></span><span class="hs-comment">--    return value (2).</span><span>
</span><span id="line-1296"></span><span class="hs-comment">--</span><span>
</span><span id="line-1297"></span><span class="hs-comment">-- 4) The other constraints of the data constructor type, excluding GADT</span><span>
</span><span id="line-1298"></span><span class="hs-comment">-- equalities</span><span>
</span><span id="line-1299"></span><span class="hs-comment">--</span><span>
</span><span id="line-1300"></span><span class="hs-comment">-- 5) The original argument types to the 'DataCon' (i.e. before</span><span>
</span><span id="line-1301"></span><span class="hs-comment">--    any change of the representation of the type) with linearity</span><span>
</span><span id="line-1302"></span><span class="hs-comment">--    annotations</span><span>
</span><span id="line-1303"></span><span class="hs-comment">--</span><span>
</span><span id="line-1304"></span><span class="hs-comment">-- 6) The original result type of the 'DataCon'</span><span>
</span><span id="line-1305"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConFullSig"><span class="hs-identifier hs-type">dataConFullSig</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span>
</span><span id="line-1306"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#TyVar"><span class="hs-identifier hs-type">TyVar</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#TyCoVar"><span class="hs-identifier hs-type">TyCoVar</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.DataCon.html#EqSpec"><span class="hs-identifier hs-type">EqSpec</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#ThetaType"><span class="hs-identifier hs-type">ThetaType</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Scaled"><span class="hs-identifier hs-type">Scaled</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1307"></span><span id="dataConFullSig"><span class="annot"><span class="annottext">dataConFullSig :: DataCon
-&gt; ([TyVar], [TyVar], [EqSpec], [Type], [Scaled Type], Type)
</span><a href="GHC.Core.DataCon.html#dataConFullSig"><span class="hs-identifier hs-var hs-var">dataConFullSig</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#MkData"><span class="hs-identifier hs-type">MkData</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">dcUnivTyVars :: DataCon -&gt; [TyVar]
</span><a href="GHC.Core.DataCon.html#dcUnivTyVars"><span class="hs-identifier hs-var">dcUnivTyVars</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822516"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822516"><span class="hs-identifier hs-var">univ_tvs</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dcExTyCoVars :: DataCon -&gt; [TyVar]
</span><a href="GHC.Core.DataCon.html#dcExTyCoVars"><span class="hs-identifier hs-var">dcExTyCoVars</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822515"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822515"><span class="hs-identifier hs-var">ex_tvs</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-1308"></span><span>                        </span><span class="annot"><span class="annottext">dcEqSpec :: DataCon -&gt; [EqSpec]
</span><a href="GHC.Core.DataCon.html#dcEqSpec"><span class="hs-identifier hs-var">dcEqSpec</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822514"><span class="annot"><span class="annottext">[EqSpec]
</span><a href="#local-6989586621680822514"><span class="hs-identifier hs-var">eq_spec</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dcOtherTheta :: DataCon -&gt; [Type]
</span><a href="GHC.Core.DataCon.html#dcOtherTheta"><span class="hs-identifier hs-var">dcOtherTheta</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822513"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822513"><span class="hs-identifier hs-var">theta</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-1309"></span><span>                        </span><span class="annot"><span class="annottext">dcOrigArgTys :: DataCon -&gt; [Scaled Type]
</span><a href="GHC.Core.DataCon.html#dcOrigArgTys"><span class="hs-identifier hs-var">dcOrigArgTys</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822512"><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680822512"><span class="hs-identifier hs-var">arg_tys</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dcOrigResTy :: DataCon -&gt; Type
</span><a href="GHC.Core.DataCon.html#dcOrigResTy"><span class="hs-identifier hs-var">dcOrigResTy</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822511"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822511"><span class="hs-identifier hs-var">res_ty</span></a></span></span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-1310"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822516"><span class="hs-identifier hs-var">univ_tvs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822515"><span class="hs-identifier hs-var">ex_tvs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[EqSpec]
</span><a href="#local-6989586621680822514"><span class="hs-identifier hs-var">eq_spec</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822513"><span class="hs-identifier hs-var">theta</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680822512"><span class="hs-identifier hs-var">arg_tys</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822511"><span class="hs-identifier hs-var">res_ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1311"></span><span>
</span><span id="line-1312"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConOrigResTy"><span class="hs-identifier hs-type">dataConOrigResTy</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span>
</span><span id="line-1313"></span><span id="dataConOrigResTy"><span class="annot"><span class="annottext">dataConOrigResTy :: DataCon -&gt; Type
</span><a href="GHC.Core.DataCon.html#dataConOrigResTy"><span class="hs-identifier hs-var hs-var">dataConOrigResTy</span></a></span></span><span> </span><span id="local-6989586621680822510"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822510"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Type
</span><a href="GHC.Core.DataCon.html#dcOrigResTy"><span class="hs-identifier hs-var hs-var">dcOrigResTy</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822510"><span class="hs-identifier hs-var">dc</span></a></span><span>
</span><span id="line-1314"></span><span>
</span><span id="line-1315"></span><span class="hs-comment">-- | The \&quot;stupid theta\&quot; of the 'DataCon', such as @data Eq a@ in:</span><span>
</span><span id="line-1316"></span><span class="hs-comment">--</span><span>
</span><span id="line-1317"></span><span class="hs-comment">-- &gt; data Eq a =&gt; T a = ...</span><span>
</span><span id="line-1318"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConStupidTheta"><span class="hs-identifier hs-type">dataConStupidTheta</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#ThetaType"><span class="hs-identifier hs-type">ThetaType</span></a></span><span>
</span><span id="line-1319"></span><span id="dataConStupidTheta"><span class="annot"><span class="annottext">dataConStupidTheta :: DataCon -&gt; [Type]
</span><a href="GHC.Core.DataCon.html#dataConStupidTheta"><span class="hs-identifier hs-var hs-var">dataConStupidTheta</span></a></span></span><span> </span><span id="local-6989586621680822509"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822509"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; [Type]
</span><a href="GHC.Core.DataCon.html#dcStupidTheta"><span class="hs-identifier hs-var hs-var">dcStupidTheta</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822509"><span class="hs-identifier hs-var">dc</span></a></span><span>
</span><span id="line-1320"></span><span>
</span><span id="line-1321"></span><span class="hs-comment">{-
Note [Displaying linear fields]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A constructor with a linear field can be written either as
MkT :: a %1 -&gt; T a (with -XLinearTypes)
or
MkT :: a  -&gt; T a (with -XNoLinearTypes)

There are two different methods to retrieve a type of a datacon.
They differ in how linear fields are handled.

1. dataConWrapperType:
The type of the wrapper in Core.
For example, dataConWrapperType for Maybe is a %1 -&gt; Just a.

2. dataConNonlinearType:
The type of the constructor, with linear arrows replaced by unrestricted ones.
Used when we don't want to introduce linear types to user (in holes
and in types in hie used by haddock).

3. dataConDisplayType (depends on DynFlags):
The type we'd like to show in error messages, :info and -ddump-types.
Ideally, it should reflect the type written by the user;
the function returns a type with arrows that would be required
to write this constructor under the current setting of -XLinearTypes.
In principle, this type can be different from the user's source code
when the value of -XLinearTypes has changed, but we don't
expect this to cause much trouble.

Due to internal plumbing in checkValidDataCon, we can't just return a Doc.
The multiplicity of arrows returned by dataConDisplayType and
dataConDisplayType is used only for pretty-printing.
-}</span><span>
</span><span id="line-1354"></span><span>
</span><span id="line-1355"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConWrapperType"><span class="hs-identifier hs-type">dataConWrapperType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span>
</span><span id="line-1356"></span><span class="hs-comment">-- ^ The user-declared type of the data constructor</span><span>
</span><span id="line-1357"></span><span class="hs-comment">-- in the nice-to-read form:</span><span>
</span><span id="line-1358"></span><span class="hs-comment">--</span><span>
</span><span id="line-1359"></span><span class="hs-comment">-- &gt; T :: forall a b. a -&gt; b -&gt; T [a]</span><span>
</span><span id="line-1360"></span><span class="hs-comment">--</span><span>
</span><span id="line-1361"></span><span class="hs-comment">-- rather than:</span><span>
</span><span id="line-1362"></span><span class="hs-comment">--</span><span>
</span><span id="line-1363"></span><span class="hs-comment">-- &gt; T :: forall a c. forall b. (c~[a]) =&gt; a -&gt; b -&gt; T c</span><span>
</span><span id="line-1364"></span><span class="hs-comment">--</span><span>
</span><span id="line-1365"></span><span class="hs-comment">-- The type variables are quantified in the order that the user wrote them.</span><span>
</span><span id="line-1366"></span><span class="hs-comment">-- See @Note [DataCon user type variable binders]@.</span><span>
</span><span id="line-1367"></span><span class="hs-comment">--</span><span>
</span><span id="line-1368"></span><span class="hs-comment">-- NB: If the constructor is part of a data instance, the result type</span><span>
</span><span id="line-1369"></span><span class="hs-comment">-- mentions the family tycon, not the internal one.</span><span>
</span><span id="line-1370"></span><span id="dataConWrapperType"><span class="annot"><span class="annottext">dataConWrapperType :: DataCon -&gt; Type
</span><a href="GHC.Core.DataCon.html#dataConWrapperType"><span class="hs-identifier hs-var hs-var">dataConWrapperType</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#MkData"><span class="hs-identifier hs-type">MkData</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dcUserTyVarBinders :: DataCon -&gt; [InvisTVBinder]
</span><a href="GHC.Core.DataCon.html#dcUserTyVarBinders"><span class="hs-identifier hs-var">dcUserTyVarBinders</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822508"><span class="annot"><span class="annottext">[InvisTVBinder]
</span><a href="#local-6989586621680822508"><span class="hs-identifier hs-var">user_tvbs</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-1371"></span><span>                             </span><span class="annot"><span class="annottext">dcOtherTheta :: DataCon -&gt; [Type]
</span><a href="GHC.Core.DataCon.html#dcOtherTheta"><span class="hs-identifier hs-var">dcOtherTheta</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822507"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822507"><span class="hs-identifier hs-var">theta</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dcOrigArgTys :: DataCon -&gt; [Scaled Type]
</span><a href="GHC.Core.DataCon.html#dcOrigArgTys"><span class="hs-identifier hs-var">dcOrigArgTys</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822506"><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680822506"><span class="hs-identifier hs-var">arg_tys</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-1372"></span><span>                             </span><span class="annot"><span class="annottext">dcOrigResTy :: DataCon -&gt; Type
</span><a href="GHC.Core.DataCon.html#dcOrigResTy"><span class="hs-identifier hs-var">dcOrigResTy</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822505"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822505"><span class="hs-identifier hs-var">res_ty</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-1373"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[InvisTVBinder] -&gt; Type -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#mkInvisForAllTys"><span class="hs-identifier hs-var">mkInvisForAllTys</span></a></span><span> </span><span class="annot"><span class="annottext">[InvisTVBinder]
</span><a href="#local-6989586621680822508"><span class="hs-identifier hs-var">user_tvbs</span></a></span><span> </span><span class="annot"><span class="annottext">(Type -&gt; Type) -&gt; Type -&gt; Type
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1374"></span><span>    </span><span class="annot"><span class="annottext">[Type] -&gt; Type -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#mkInvisFunTysMany"><span class="hs-identifier hs-var">mkInvisFunTysMany</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822507"><span class="hs-identifier hs-var">theta</span></a></span><span> </span><span class="annot"><span class="annottext">(Type -&gt; Type) -&gt; Type -&gt; Type
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1375"></span><span>    </span><span class="annot"><span class="annottext">[Scaled Type] -&gt; Type -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#mkVisFunTys"><span class="hs-identifier hs-var">mkVisFunTys</span></a></span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680822506"><span class="hs-identifier hs-var">arg_tys</span></a></span><span> </span><span class="annot"><span class="annottext">(Type -&gt; Type) -&gt; Type -&gt; Type
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1376"></span><span>    </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822505"><span class="hs-identifier hs-var">res_ty</span></a></span><span>
</span><span id="line-1377"></span><span>
</span><span id="line-1378"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConNonlinearType"><span class="hs-identifier hs-type">dataConNonlinearType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span>
</span><span id="line-1379"></span><span id="dataConNonlinearType"><span class="annot"><span class="annottext">dataConNonlinearType :: DataCon -&gt; Type
</span><a href="GHC.Core.DataCon.html#dataConNonlinearType"><span class="hs-identifier hs-var hs-var">dataConNonlinearType</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#MkData"><span class="hs-identifier hs-type">MkData</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dcUserTyVarBinders :: DataCon -&gt; [InvisTVBinder]
</span><a href="GHC.Core.DataCon.html#dcUserTyVarBinders"><span class="hs-identifier hs-var">dcUserTyVarBinders</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822502"><span class="annot"><span class="annottext">[InvisTVBinder]
</span><a href="#local-6989586621680822502"><span class="hs-identifier hs-var">user_tvbs</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-1380"></span><span>                               </span><span class="annot"><span class="annottext">dcOtherTheta :: DataCon -&gt; [Type]
</span><a href="GHC.Core.DataCon.html#dcOtherTheta"><span class="hs-identifier hs-var">dcOtherTheta</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822501"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822501"><span class="hs-identifier hs-var">theta</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dcOrigArgTys :: DataCon -&gt; [Scaled Type]
</span><a href="GHC.Core.DataCon.html#dcOrigArgTys"><span class="hs-identifier hs-var">dcOrigArgTys</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822500"><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680822500"><span class="hs-identifier hs-var">arg_tys</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-1381"></span><span>                               </span><span class="annot"><span class="annottext">dcOrigResTy :: DataCon -&gt; Type
</span><a href="GHC.Core.DataCon.html#dcOrigResTy"><span class="hs-identifier hs-var">dcOrigResTy</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822499"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822499"><span class="hs-identifier hs-var">res_ty</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-1382"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680822498"><span class="annot"><span class="annottext">arg_tys' :: [Scaled Type]
</span><a href="#local-6989586621680822498"><span class="hs-identifier hs-var hs-var">arg_tys'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Scaled Type -&gt; Scaled Type) -&gt; [Scaled Type] -&gt; [Scaled Type]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Scaled"><span class="hs-identifier hs-type">Scaled</span></a></span><span> </span><span id="local-6989586621680822496"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822496"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621680822495"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822495"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Type -&gt; Type -&gt; Scaled Type
forall a. Type -&gt; a -&gt; Scaled a
</span><a href="GHC.Core.TyCo.Rep.html#Scaled"><span class="hs-identifier hs-var">Scaled</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822496"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Core.Type.html#One"><span class="hs-identifier hs-var">One</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Core.Type.html#Many"><span class="hs-identifier hs-var">Many</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822496"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822495"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680822500"><span class="hs-identifier hs-var">arg_tys</span></a></span><span>
</span><span id="line-1383"></span><span>    </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">[InvisTVBinder] -&gt; Type -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#mkInvisForAllTys"><span class="hs-identifier hs-var">mkInvisForAllTys</span></a></span><span> </span><span class="annot"><span class="annottext">[InvisTVBinder]
</span><a href="#local-6989586621680822502"><span class="hs-identifier hs-var">user_tvbs</span></a></span><span> </span><span class="annot"><span class="annottext">(Type -&gt; Type) -&gt; Type -&gt; Type
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1384"></span><span>       </span><span class="annot"><span class="annottext">[Type] -&gt; Type -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#mkInvisFunTysMany"><span class="hs-identifier hs-var">mkInvisFunTysMany</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822501"><span class="hs-identifier hs-var">theta</span></a></span><span> </span><span class="annot"><span class="annottext">(Type -&gt; Type) -&gt; Type -&gt; Type
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1385"></span><span>       </span><span class="annot"><span class="annottext">[Scaled Type] -&gt; Type -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#mkVisFunTys"><span class="hs-identifier hs-var">mkVisFunTys</span></a></span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680822498"><span class="hs-identifier hs-var">arg_tys'</span></a></span><span> </span><span class="annot"><span class="annottext">(Type -&gt; Type) -&gt; Type -&gt; Type
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1386"></span><span>       </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822499"><span class="hs-identifier hs-var">res_ty</span></a></span><span>
</span><span id="line-1387"></span><span>
</span><span id="line-1388"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConDisplayType"><span class="hs-identifier hs-type">dataConDisplayType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span>
</span><span id="line-1389"></span><span id="dataConDisplayType"><span class="annot"><span class="annottext">dataConDisplayType :: DynFlags -&gt; DataCon -&gt; Type
</span><a href="GHC.Core.DataCon.html#dataConDisplayType"><span class="hs-identifier hs-var hs-var">dataConDisplayType</span></a></span></span><span> </span><span id="local-6989586621680822492"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680822492"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621680822491"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822491"><span class="hs-identifier hs-var">dc</span></a></span></span><span>
</span><span id="line-1390"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Extension -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#xopt"><span class="hs-identifier hs-var">xopt</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="../../ghc-boot-th/src/GHC.LanguageExtensions.Type.html#LinearTypes"><span class="hs-identifier hs-var">LangExt.LinearTypes</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680822492"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-1391"></span><span>    </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Type
</span><a href="GHC.Core.DataCon.html#dataConWrapperType"><span class="hs-identifier hs-var">dataConWrapperType</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822491"><span class="hs-identifier hs-var">dc</span></a></span><span>
</span><span id="line-1392"></span><span>    </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Type
</span><a href="GHC.Core.DataCon.html#dataConNonlinearType"><span class="hs-identifier hs-var">dataConNonlinearType</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822491"><span class="hs-identifier hs-var">dc</span></a></span><span>
</span><span id="line-1393"></span><span>
</span><span id="line-1394"></span><span class="hs-comment">-- | Finds the instantiated types of the arguments required to construct a</span><span>
</span><span id="line-1395"></span><span class="hs-comment">-- 'DataCon' representation</span><span>
</span><span id="line-1396"></span><span class="hs-comment">-- NB: these INCLUDE any dictionary args</span><span>
</span><span id="line-1397"></span><span class="hs-comment">--     but EXCLUDE the data-declaration context, which is discarded</span><span>
</span><span id="line-1398"></span><span class="hs-comment">-- It's all post-flattening etc; this is a representation type</span><span>
</span><span id="line-1399"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConInstArgTys"><span class="hs-identifier hs-type">dataConInstArgTys</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span>    </span><span class="hs-comment">-- ^ A datacon with no existentials or equality constraints</span><span>
</span><span id="line-1400"></span><span>                                </span><span class="hs-comment">-- However, it can have a dcTheta (notably it can be a</span><span>
</span><span id="line-1401"></span><span>                                </span><span class="hs-comment">-- class dictionary, with superclasses)</span><span>
</span><span id="line-1402"></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span>     </span><span class="hs-comment">-- ^ Instantiated at these types</span><span>
</span><span id="line-1403"></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Scaled"><span class="hs-identifier hs-type">Scaled</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1404"></span><span id="dataConInstArgTys"><span class="annot"><span class="annottext">dataConInstArgTys :: DataCon -&gt; [Type] -&gt; [Scaled Type]
</span><a href="GHC.Core.DataCon.html#dataConInstArgTys"><span class="hs-identifier hs-var hs-var">dataConInstArgTys</span></a></span></span><span> </span><span id="local-6989586621680822488"><span class="annot"><span class="annottext">dc :: DataCon
</span><a href="#local-6989586621680822488"><span class="hs-identifier hs-var">dc</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#MkData"><span class="hs-identifier hs-type">MkData</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">dcUnivTyVars :: DataCon -&gt; [TyVar]
</span><a href="GHC.Core.DataCon.html#dcUnivTyVars"><span class="hs-identifier hs-var">dcUnivTyVars</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822487"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822487"><span class="hs-identifier hs-var">univ_tvs</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-1405"></span><span>                              </span><span class="annot"><span class="annottext">dcExTyCoVars :: DataCon -&gt; [TyVar]
</span><a href="GHC.Core.DataCon.html#dcExTyCoVars"><span class="hs-identifier hs-var">dcExTyCoVars</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822486"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822486"><span class="hs-identifier hs-var">ex_tvs</span></a></span></span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span id="local-6989586621680822485"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822485"><span class="hs-identifier hs-var">inst_tys</span></a></span></span><span>
</span><span id="line-1406"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT2</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">univ_tvs</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">equalLength</span><span class="hs-special">`</span><span> </span><span class="hs-identifier">inst_tys</span><span>
</span><span id="line-1407"></span><span>          </span><span class="hs-special">,</span><span> </span><span class="hs-identifier">text</span><span> </span><span class="hs-string">&quot;dataConInstArgTys&quot;</span><span> </span><span class="hs-operator">&lt;+&gt;</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">dc</span><span> </span><span class="hs-operator">$$</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">univ_tvs</span><span> </span><span class="hs-operator">$$</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">inst_tys</span><span class="hs-special">)</span><span>
</span><span id="line-1408"></span><span>   </span><span class="hs-identifier">ASSERT2</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">null</span><span> </span><span class="hs-identifier">ex_tvs</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">dc</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-1409"></span><span>   </span><span class="annot"><span class="annottext">(Scaled Type -&gt; Scaled Type) -&gt; [Scaled Type] -&gt; [Scaled Type]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Type -&gt; Type) -&gt; Scaled Type -&gt; Scaled Type
</span><a href="GHC.Core.TyCo.Rep.html#mapScaledType"><span class="hs-identifier hs-var">mapScaledType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HasCallStack =&gt; [TyVar] -&gt; [Type] -&gt; Type -&gt; Type
[TyVar] -&gt; [Type] -&gt; Type -&gt; Type
</span><a href="GHC.Core.TyCo.Subst.html#substTyWith"><span class="hs-identifier hs-var">substTyWith</span></a></span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822487"><span class="hs-identifier hs-var">univ_tvs</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822485"><span class="hs-identifier hs-var">inst_tys</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; [Scaled Type]
</span><a href="GHC.Core.DataCon.html#dataConRepArgTys"><span class="hs-identifier hs-var">dataConRepArgTys</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822488"><span class="hs-identifier hs-var">dc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1410"></span><span>
</span><span id="line-1411"></span><span class="hs-comment">-- | Returns just the instantiated /value/ argument types of a 'DataCon',</span><span>
</span><span id="line-1412"></span><span class="hs-comment">-- (excluding dictionary args)</span><span>
</span><span id="line-1413"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConInstOrigArgTys"><span class="hs-identifier hs-type">dataConInstOrigArgTys</span></a></span><span>
</span><span id="line-1414"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span>      </span><span class="hs-comment">-- Works for any DataCon</span><span>
</span><span id="line-1415"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span>       </span><span class="hs-comment">-- Includes existential tyvar args, but NOT</span><span>
</span><span id="line-1416"></span><span>                        </span><span class="hs-comment">-- equality constraints or dicts</span><span>
</span><span id="line-1417"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Scaled"><span class="hs-identifier hs-type">Scaled</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1418"></span><span class="hs-comment">-- For vanilla datacons, it's all quite straightforward</span><span>
</span><span id="line-1419"></span><span class="hs-comment">-- But for the call in GHC.HsToCore.Match.Constructor, we really do want just</span><span>
</span><span id="line-1420"></span><span class="hs-comment">-- the value args</span><span>
</span><span id="line-1421"></span><span id="dataConInstOrigArgTys"><span class="annot"><span class="annottext">dataConInstOrigArgTys :: DataCon -&gt; [Type] -&gt; [Scaled Type]
</span><a href="GHC.Core.DataCon.html#dataConInstOrigArgTys"><span class="hs-identifier hs-var hs-var">dataConInstOrigArgTys</span></a></span></span><span> </span><span id="local-6989586621680822478"><span class="annot"><span class="annottext">dc :: DataCon
</span><a href="#local-6989586621680822478"><span class="hs-identifier hs-var">dc</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#MkData"><span class="hs-identifier hs-type">MkData</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">dcOrigArgTys :: DataCon -&gt; [Scaled Type]
</span><a href="GHC.Core.DataCon.html#dcOrigArgTys"><span class="hs-identifier hs-var">dcOrigArgTys</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822477"><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680822477"><span class="hs-identifier hs-var">arg_tys</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-1422"></span><span>                                  </span><span class="annot"><span class="annottext">dcUnivTyVars :: DataCon -&gt; [TyVar]
</span><a href="GHC.Core.DataCon.html#dcUnivTyVars"><span class="hs-identifier hs-var">dcUnivTyVars</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822476"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822476"><span class="hs-identifier hs-var">univ_tvs</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-1423"></span><span>                                  </span><span class="annot"><span class="annottext">dcExTyCoVars :: DataCon -&gt; [TyVar]
</span><a href="GHC.Core.DataCon.html#dcExTyCoVars"><span class="hs-identifier hs-var">dcExTyCoVars</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822475"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822475"><span class="hs-identifier hs-var">ex_tvs</span></a></span></span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span id="local-6989586621680822474"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822474"><span class="hs-identifier hs-var">inst_tys</span></a></span></span><span>
</span><span id="line-1424"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT2</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">tyvars</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">equalLength</span><span class="hs-special">`</span><span> </span><span class="hs-identifier">inst_tys</span><span>
</span><span id="line-1425"></span><span>           </span><span class="hs-special">,</span><span> </span><span class="hs-identifier">text</span><span> </span><span class="hs-string">&quot;dataConInstOrigArgTys&quot;</span><span> </span><span class="hs-operator">&lt;+&gt;</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">dc</span><span> </span><span class="hs-operator">$$</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">tyvars</span><span> </span><span class="hs-operator">$$</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">inst_tys</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-1426"></span><span>    </span><span class="annot"><span class="annottext">HasCallStack =&gt; TCvSubst -&gt; [Scaled Type] -&gt; [Scaled Type]
TCvSubst -&gt; [Scaled Type] -&gt; [Scaled Type]
</span><a href="GHC.Core.TyCo.Subst.html#substScaledTys"><span class="hs-identifier hs-var">substScaledTys</span></a></span><span> </span><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680822471"><span class="hs-identifier hs-var">subst</span></a></span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680822477"><span class="hs-identifier hs-var">arg_tys</span></a></span><span>
</span><span id="line-1427"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1428"></span><span>    </span><span id="local-6989586621680822473"><span class="annot"><span class="annottext">tyvars :: [TyVar]
</span><a href="#local-6989586621680822473"><span class="hs-identifier hs-var hs-var">tyvars</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822476"><span class="hs-identifier hs-var">univ_tvs</span></a></span><span> </span><span class="annot"><span class="annottext">[TyVar] -&gt; [TyVar] -&gt; [TyVar]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822475"><span class="hs-identifier hs-var">ex_tvs</span></a></span><span>
</span><span id="line-1429"></span><span>    </span><span id="local-6989586621680822471"><span class="annot"><span class="annottext">subst :: TCvSubst
</span><a href="#local-6989586621680822471"><span class="hs-identifier hs-var hs-var">subst</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[TyVar] -&gt; [Type] -&gt; TCvSubst
HasDebugCallStack =&gt; [TyVar] -&gt; [Type] -&gt; TCvSubst
</span><a href="GHC.Core.TyCo.Subst.html#zipTCvSubst"><span class="hs-identifier hs-var">zipTCvSubst</span></a></span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822473"><span class="hs-identifier hs-var">tyvars</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822474"><span class="hs-identifier hs-var">inst_tys</span></a></span><span>
</span><span id="line-1430"></span><span>
</span><span id="line-1431"></span><span class="hs-comment">-- | Returns the argument types of the wrapper, excluding all dictionary arguments</span><span>
</span><span id="line-1432"></span><span class="hs-comment">-- and without substituting for any type variables</span><span>
</span><span id="line-1433"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConOrigArgTys"><span class="hs-identifier hs-type">dataConOrigArgTys</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Scaled"><span class="hs-identifier hs-type">Scaled</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1434"></span><span id="dataConOrigArgTys"><span class="annot"><span class="annottext">dataConOrigArgTys :: DataCon -&gt; [Scaled Type]
</span><a href="GHC.Core.DataCon.html#dataConOrigArgTys"><span class="hs-identifier hs-var hs-var">dataConOrigArgTys</span></a></span></span><span> </span><span id="local-6989586621680822468"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822468"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; [Scaled Type]
</span><a href="GHC.Core.DataCon.html#dcOrigArgTys"><span class="hs-identifier hs-var hs-var">dcOrigArgTys</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822468"><span class="hs-identifier hs-var">dc</span></a></span><span>
</span><span id="line-1435"></span><span>
</span><span id="line-1436"></span><span class="hs-comment">-- | Returns constraints in the wrapper type, other than those in the dataConEqSpec</span><span>
</span><span id="line-1437"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConOtherTheta"><span class="hs-identifier hs-type">dataConOtherTheta</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#ThetaType"><span class="hs-identifier hs-type">ThetaType</span></a></span><span>
</span><span id="line-1438"></span><span id="dataConOtherTheta"><span class="annot"><span class="annottext">dataConOtherTheta :: DataCon -&gt; [Type]
</span><a href="GHC.Core.DataCon.html#dataConOtherTheta"><span class="hs-identifier hs-var hs-var">dataConOtherTheta</span></a></span></span><span> </span><span id="local-6989586621680822467"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822467"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; [Type]
</span><a href="GHC.Core.DataCon.html#dcOtherTheta"><span class="hs-identifier hs-var hs-var">dcOtherTheta</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822467"><span class="hs-identifier hs-var">dc</span></a></span><span>
</span><span id="line-1439"></span><span>
</span><span id="line-1440"></span><span class="hs-comment">-- | Returns the arg types of the worker, including *all* non-dependent</span><span>
</span><span id="line-1441"></span><span class="hs-comment">-- evidence, after any flattening has been done and without substituting for</span><span>
</span><span id="line-1442"></span><span class="hs-comment">-- any type variables</span><span>
</span><span id="line-1443"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConRepArgTys"><span class="hs-identifier hs-type">dataConRepArgTys</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Scaled"><span class="hs-identifier hs-type">Scaled</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1444"></span><span id="dataConRepArgTys"><span class="annot"><span class="annottext">dataConRepArgTys :: DataCon -&gt; [Scaled Type]
</span><a href="GHC.Core.DataCon.html#dataConRepArgTys"><span class="hs-identifier hs-var hs-var">dataConRepArgTys</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#MkData"><span class="hs-identifier hs-type">MkData</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dcRep :: DataCon -&gt; DataConRep
</span><a href="GHC.Core.DataCon.html#dcRep"><span class="hs-identifier hs-var">dcRep</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822466"><span class="annot"><span class="annottext">DataConRep
</span><a href="#local-6989586621680822466"><span class="hs-identifier hs-var">rep</span></a></span></span><span>
</span><span id="line-1445"></span><span>                         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dcEqSpec :: DataCon -&gt; [EqSpec]
</span><a href="GHC.Core.DataCon.html#dcEqSpec"><span class="hs-identifier hs-var">dcEqSpec</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822465"><span class="annot"><span class="annottext">[EqSpec]
</span><a href="#local-6989586621680822465"><span class="hs-identifier hs-var">eq_spec</span></a></span></span><span>
</span><span id="line-1446"></span><span>                         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dcOtherTheta :: DataCon -&gt; [Type]
</span><a href="GHC.Core.DataCon.html#dcOtherTheta"><span class="hs-identifier hs-var">dcOtherTheta</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822464"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822464"><span class="hs-identifier hs-var">theta</span></a></span></span><span>
</span><span id="line-1447"></span><span>                         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dcOrigArgTys :: DataCon -&gt; [Scaled Type]
</span><a href="GHC.Core.DataCon.html#dcOrigArgTys"><span class="hs-identifier hs-var">dcOrigArgTys</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822463"><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680822463"><span class="hs-identifier hs-var">orig_arg_tys</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-1448"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">DataConRep
</span><a href="#local-6989586621680822466"><span class="hs-identifier hs-var">rep</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1449"></span><span>      </span><span class="annot"><span class="annottext">DataConRep
</span><a href="GHC.Core.DataCon.html#NoDataConRep"><span class="hs-identifier hs-var">NoDataConRep</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">null</span><span> </span><span class="hs-identifier">eq_spec</span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">map</span><span> </span><span class="hs-identifier">unrestricted</span><span> </span><span class="hs-identifier">theta</span><span class="hs-special">)</span><span> </span><span class="hs-operator">++</span><span> </span><span class="hs-identifier">orig_arg_tys</span><span>
</span><span id="line-1450"></span><span>      </span><span class="annot"><a href="GHC.Core.DataCon.html#DCR"><span class="hs-identifier hs-type">DCR</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dcr_arg_tys :: DataConRep -&gt; [Scaled Type]
</span><a href="GHC.Core.DataCon.html#dcr_arg_tys"><span class="hs-identifier hs-var">dcr_arg_tys</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822460"><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680822460"><span class="hs-identifier hs-var">arg_tys</span></a></span></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680822460"><span class="hs-identifier hs-var">arg_tys</span></a></span><span>
</span><span id="line-1451"></span><span>
</span><span id="line-1452"></span><span class="hs-comment">-- | The string @package:module.name@ identifying a constructor, which is attached</span><span>
</span><span id="line-1453"></span><span class="hs-comment">-- to its info table and used by the GHCi debugger and the heap profiler</span><span>
</span><span id="line-1454"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConIdentity"><span class="hs-identifier hs-type">dataConIdentity</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span>
</span><span id="line-1455"></span><span class="hs-comment">-- We want this string to be UTF-8, so we get the bytes directly from the FastStrings.</span><span>
</span><span id="line-1456"></span><span id="dataConIdentity"><span class="annot"><span class="annottext">dataConIdentity :: DataCon -&gt; ByteString
</span><a href="GHC.Core.DataCon.html#dataConIdentity"><span class="hs-identifier hs-var hs-var">dataConIdentity</span></a></span></span><span> </span><span id="local-6989586621680822459"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822459"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; ByteString
</span><a href="../../bytestring/src/Data.ByteString.Lazy.html#toStrict"><span class="hs-identifier hs-var">LBS.toStrict</span></a></span><span> </span><span class="annot"><span class="annottext">(ByteString -&gt; ByteString) -&gt; ByteString -&gt; ByteString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Builder -&gt; ByteString
</span><a href="../../bytestring/src/Data.ByteString.Builder.html#toLazyByteString"><span class="hs-identifier hs-var">BSB.toLazyByteString</span></a></span><span> </span><span class="annot"><span class="annottext">(Builder -&gt; ByteString) -&gt; Builder -&gt; ByteString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[Builder] -&gt; Builder
forall a. Monoid a =&gt; [a] -&gt; a
</span><a href="../../base/src/GHC.Base.html#mconcat"><span class="hs-identifier hs-var">mconcat</span></a></span><span>
</span><span id="line-1457"></span><span>   </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">ShortByteString -&gt; Builder
</span><a href="../../bytestring/src/Data.ByteString.Builder.Internal.html#shortByteString"><span class="hs-identifier hs-var">BSB.shortByteString</span></a></span><span> </span><span class="annot"><span class="annottext">(ShortByteString -&gt; Builder) -&gt; ShortByteString -&gt; Builder
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLabelString -&gt; ShortByteString
</span><a href="GHC.Data.FastString.html#fastStringToShortByteString"><span class="hs-identifier hs-var">fastStringToShortByteString</span></a></span><span> </span><span class="annot"><span class="annottext">(FieldLabelString -&gt; ShortByteString)
-&gt; FieldLabelString -&gt; ShortByteString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1458"></span><span>       </span><span class="annot"><span class="annottext">Unit -&gt; FieldLabelString
</span><a href="GHC.Unit.Types.html#unitFS"><span class="hs-identifier hs-var">unitFS</span></a></span><span> </span><span class="annot"><span class="annottext">(Unit -&gt; FieldLabelString) -&gt; Unit -&gt; FieldLabelString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">GenModule Unit -&gt; Unit
forall unit. GenModule unit -&gt; unit
</span><a href="GHC.Unit.Types.html#moduleUnit"><span class="hs-identifier hs-var hs-var">moduleUnit</span></a></span><span> </span><span class="annot"><span class="annottext">GenModule Unit
</span><a href="#local-6989586621680822452"><span class="hs-identifier hs-var">mod</span></a></span><span>
</span><span id="line-1459"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int8 -&gt; Builder
</span><a href="../../bytestring/src/Data.ByteString.Builder.html#int8"><span class="hs-identifier hs-var">BSB.int8</span></a></span><span> </span><span class="annot"><span class="annottext">(Int8 -&gt; Builder) -&gt; Int8 -&gt; Builder
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Arity -&gt; Int8
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Arity
</span><a href="../../base/src/GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">':'</span></span><span class="hs-special">)</span><span>
</span><span id="line-1460"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ShortByteString -&gt; Builder
</span><a href="../../bytestring/src/Data.ByteString.Builder.Internal.html#shortByteString"><span class="hs-identifier hs-var">BSB.shortByteString</span></a></span><span> </span><span class="annot"><span class="annottext">(ShortByteString -&gt; Builder) -&gt; ShortByteString -&gt; Builder
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLabelString -&gt; ShortByteString
</span><a href="GHC.Data.FastString.html#fastStringToShortByteString"><span class="hs-identifier hs-var">fastStringToShortByteString</span></a></span><span> </span><span class="annot"><span class="annottext">(FieldLabelString -&gt; ShortByteString)
-&gt; FieldLabelString -&gt; ShortByteString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1461"></span><span>       </span><span class="annot"><span class="annottext">ModuleName -&gt; FieldLabelString
</span><a href="GHC.Unit.Module.Name.html#moduleNameFS"><span class="hs-identifier hs-var">moduleNameFS</span></a></span><span> </span><span class="annot"><span class="annottext">(ModuleName -&gt; FieldLabelString) -&gt; ModuleName -&gt; FieldLabelString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">GenModule Unit -&gt; ModuleName
forall unit. GenModule unit -&gt; ModuleName
</span><a href="GHC.Unit.Types.html#moduleName"><span class="hs-identifier hs-var hs-var">moduleName</span></a></span><span> </span><span class="annot"><span class="annottext">GenModule Unit
</span><a href="#local-6989586621680822452"><span class="hs-identifier hs-var">mod</span></a></span><span>
</span><span id="line-1462"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int8 -&gt; Builder
</span><a href="../../bytestring/src/Data.ByteString.Builder.html#int8"><span class="hs-identifier hs-var">BSB.int8</span></a></span><span> </span><span class="annot"><span class="annottext">(Int8 -&gt; Builder) -&gt; Int8 -&gt; Builder
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Arity -&gt; Int8
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Arity
</span><a href="../../base/src/GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span class="hs-special">)</span><span>
</span><span id="line-1463"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ShortByteString -&gt; Builder
</span><a href="../../bytestring/src/Data.ByteString.Builder.Internal.html#shortByteString"><span class="hs-identifier hs-var">BSB.shortByteString</span></a></span><span> </span><span class="annot"><span class="annottext">(ShortByteString -&gt; Builder) -&gt; ShortByteString -&gt; Builder
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLabelString -&gt; ShortByteString
</span><a href="GHC.Data.FastString.html#fastStringToShortByteString"><span class="hs-identifier hs-var">fastStringToShortByteString</span></a></span><span> </span><span class="annot"><span class="annottext">(FieldLabelString -&gt; ShortByteString)
-&gt; FieldLabelString -&gt; ShortByteString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1464"></span><span>       </span><span class="annot"><span class="annottext">OccName -&gt; FieldLabelString
</span><a href="GHC.Types.Name.Occurrence.html#occNameFS"><span class="hs-identifier hs-var hs-var">occNameFS</span></a></span><span> </span><span class="annot"><span class="annottext">(OccName -&gt; FieldLabelString) -&gt; OccName -&gt; FieldLabelString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; OccName
</span><a href="GHC.Types.Name.html#nameOccName"><span class="hs-identifier hs-var">nameOccName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680822445"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-1465"></span><span>   </span><span class="hs-special">]</span><span>
</span><span id="line-1466"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621680822445"><span class="annot"><span class="annottext">name :: Name
</span><a href="#local-6989586621680822445"><span class="hs-identifier hs-var hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Name
</span><a href="GHC.Core.DataCon.html#dataConName"><span class="hs-identifier hs-var">dataConName</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822459"><span class="hs-identifier hs-var">dc</span></a></span><span>
</span><span id="line-1467"></span><span>        </span><span id="local-6989586621680822452"><span class="annot"><span class="annottext">mod :: GenModule Unit
</span><a href="#local-6989586621680822452"><span class="hs-identifier hs-var hs-var">mod</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">isExternalName</span><span> </span><span class="hs-identifier">name</span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-identifier">nameModule</span><span> </span><span class="hs-identifier">name</span><span>
</span><span id="line-1468"></span><span>
</span><span id="line-1469"></span><span class="annot"><a href="GHC.Core.DataCon.html#isTupleDataCon"><span class="hs-identifier hs-type">isTupleDataCon</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-1470"></span><span id="isTupleDataCon"><span class="annot"><span class="annottext">isTupleDataCon :: DataCon -&gt; Bool
</span><a href="GHC.Core.DataCon.html#isTupleDataCon"><span class="hs-identifier hs-var hs-var">isTupleDataCon</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#MkData"><span class="hs-identifier hs-type">MkData</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">dcRepTyCon :: DataCon -&gt; TyCon
</span><a href="GHC.Core.DataCon.html#dcRepTyCon"><span class="hs-identifier hs-var">dcRepTyCon</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822441"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680822441"><span class="hs-identifier hs-var">tc</span></a></span></span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Bool
</span><a href="GHC.Core.TyCon.html#isTupleTyCon"><span class="hs-identifier hs-var">isTupleTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680822441"><span class="hs-identifier hs-var">tc</span></a></span><span>
</span><span id="line-1471"></span><span>
</span><span id="line-1472"></span><span class="annot"><a href="GHC.Core.DataCon.html#isUnboxedTupleCon"><span class="hs-identifier hs-type">isUnboxedTupleCon</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-1473"></span><span id="isUnboxedTupleCon"><span class="annot"><span class="annottext">isUnboxedTupleCon :: DataCon -&gt; Bool
</span><a href="GHC.Core.DataCon.html#isUnboxedTupleCon"><span class="hs-identifier hs-var hs-var">isUnboxedTupleCon</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#MkData"><span class="hs-identifier hs-type">MkData</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">dcRepTyCon :: DataCon -&gt; TyCon
</span><a href="GHC.Core.DataCon.html#dcRepTyCon"><span class="hs-identifier hs-var">dcRepTyCon</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822439"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680822439"><span class="hs-identifier hs-var">tc</span></a></span></span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Bool
</span><a href="GHC.Core.TyCon.html#isUnboxedTupleTyCon"><span class="hs-identifier hs-var">isUnboxedTupleTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680822439"><span class="hs-identifier hs-var">tc</span></a></span><span>
</span><span id="line-1474"></span><span>
</span><span id="line-1475"></span><span class="annot"><a href="GHC.Core.DataCon.html#isUnboxedSumCon"><span class="hs-identifier hs-type">isUnboxedSumCon</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-1476"></span><span id="isUnboxedSumCon"><span class="annot"><span class="annottext">isUnboxedSumCon :: DataCon -&gt; Bool
</span><a href="GHC.Core.DataCon.html#isUnboxedSumCon"><span class="hs-identifier hs-var hs-var">isUnboxedSumCon</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#MkData"><span class="hs-identifier hs-type">MkData</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">dcRepTyCon :: DataCon -&gt; TyCon
</span><a href="GHC.Core.DataCon.html#dcRepTyCon"><span class="hs-identifier hs-var">dcRepTyCon</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822437"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680822437"><span class="hs-identifier hs-var">tc</span></a></span></span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Bool
</span><a href="GHC.Core.TyCon.html#isUnboxedSumTyCon"><span class="hs-identifier hs-var">isUnboxedSumTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680822437"><span class="hs-identifier hs-var">tc</span></a></span><span>
</span><span id="line-1477"></span><span>
</span><span id="line-1478"></span><span class="hs-comment">-- | Vanilla 'DataCon's are those that are nice boring Haskell 98 constructors</span><span>
</span><span id="line-1479"></span><span class="annot"><a href="GHC.Core.DataCon.html#isVanillaDataCon"><span class="hs-identifier hs-type">isVanillaDataCon</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-1480"></span><span id="isVanillaDataCon"><span class="annot"><span class="annottext">isVanillaDataCon :: DataCon -&gt; Bool
</span><a href="GHC.Core.DataCon.html#isVanillaDataCon"><span class="hs-identifier hs-var hs-var">isVanillaDataCon</span></a></span></span><span> </span><span id="local-6989586621680822435"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822435"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Bool
</span><a href="GHC.Core.DataCon.html#dcVanilla"><span class="hs-identifier hs-var hs-var">dcVanilla</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822435"><span class="hs-identifier hs-var">dc</span></a></span><span>
</span><span id="line-1481"></span><span>
</span><span id="line-1482"></span><span class="hs-comment">-- | Should this DataCon be allowed in a type even without -XDataKinds?</span><span>
</span><span id="line-1483"></span><span class="hs-comment">-- Currently, only Lifted &amp; Unlifted</span><span>
</span><span id="line-1484"></span><span class="annot"><a href="GHC.Core.DataCon.html#specialPromotedDc"><span class="hs-identifier hs-type">specialPromotedDc</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-1485"></span><span id="specialPromotedDc"><span class="annot"><span class="annottext">specialPromotedDc :: DataCon -&gt; Bool
</span><a href="GHC.Core.DataCon.html#specialPromotedDc"><span class="hs-identifier hs-var hs-var">specialPromotedDc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Bool
</span><a href="GHC.Core.TyCon.html#isKindTyCon"><span class="hs-identifier hs-var">isKindTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">(TyCon -&gt; Bool) -&gt; (DataCon -&gt; TyCon) -&gt; DataCon -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; TyCon
</span><a href="GHC.Core.DataCon.html#dataConTyCon"><span class="hs-identifier hs-var">dataConTyCon</span></a></span><span>
</span><span id="line-1486"></span><span>
</span><span id="line-1487"></span><span class="annot"><a href="GHC.Core.DataCon.html#classDataCon"><span class="hs-identifier hs-type">classDataCon</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span>
</span><span id="line-1488"></span><span id="classDataCon"><span class="annot"><span class="annottext">classDataCon :: Class -&gt; DataCon
</span><a href="GHC.Core.DataCon.html#classDataCon"><span class="hs-identifier hs-var hs-var">classDataCon</span></a></span></span><span> </span><span id="local-6989586621680822433"><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680822433"><span class="hs-identifier hs-var">clas</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; [DataCon]
</span><a href="GHC.Core.TyCon.html#tyConDataCons"><span class="hs-identifier hs-var">tyConDataCons</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Class -&gt; TyCon
</span><a href="GHC.Core.Class.html#classTyCon"><span class="hs-identifier hs-var hs-var">classTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680822433"><span class="hs-identifier hs-var">clas</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1489"></span><span>                      </span><span class="hs-special">(</span><span id="local-6989586621680822430"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822430"><span class="hs-identifier hs-var">dict_constr</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621680822429"><span class="annot"><span class="annottext">[DataCon]
</span><a href="#local-6989586621680822429"><span class="hs-identifier hs-var">no_more</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">null</span><span> </span><span class="hs-identifier">no_more</span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-identifier">dict_constr</span><span>
</span><span id="line-1490"></span><span>                      </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; DataCon
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;classDataCon&quot;</span></span><span>
</span><span id="line-1491"></span><span>
</span><span id="line-1492"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConCannotMatch"><span class="hs-identifier hs-type">dataConCannotMatch</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-1493"></span><span class="hs-comment">-- Returns True iff the data con *definitely cannot* match a</span><span>
</span><span id="line-1494"></span><span class="hs-comment">--                  scrutinee of type (T tys)</span><span>
</span><span id="line-1495"></span><span class="hs-comment">--                  where T is the dcRepTyCon for the data con</span><span>
</span><span id="line-1496"></span><span id="dataConCannotMatch"><span class="annot"><span class="annottext">dataConCannotMatch :: [Type] -&gt; DataCon -&gt; Bool
</span><a href="GHC.Core.DataCon.html#dataConCannotMatch"><span class="hs-identifier hs-var hs-var">dataConCannotMatch</span></a></span></span><span> </span><span id="local-6989586621680822427"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822427"><span class="hs-identifier hs-var">tys</span></a></span></span><span> </span><span id="local-6989586621680822426"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822426"><span class="hs-identifier hs-var">con</span></a></span></span><span>
</span><span id="line-1497"></span><span>  </span><span class="hs-comment">-- See (U6) in Note [Implementing unsafeCoerce]</span><span>
</span><span id="line-1498"></span><span>  </span><span class="hs-comment">-- in base:Unsafe.Coerce</span><span>
</span><span id="line-1499"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Name
</span><a href="GHC.Core.DataCon.html#dataConName"><span class="hs-identifier hs-var">dataConName</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822426"><span class="hs-identifier hs-var">con</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; Name -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="GHC.Builtin.Names.html#unsafeReflDataConName"><span class="hs-identifier hs-var">unsafeReflDataConName</span></a></span><span>
</span><span id="line-1500"></span><span>                      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-1501"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">[Type] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822424"><span class="hs-identifier hs-var">inst_theta</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>   </span><span class="hs-comment">-- Common</span><span>
</span><span id="line-1502"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">(Type -&gt; Bool) -&gt; [Type] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#all"><span class="hs-identifier hs-var">all</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; Bool
</span><a href="GHC.Core.Type.html#isTyVarTy"><span class="hs-identifier hs-var">isTyVarTy</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822427"><span class="hs-identifier hs-var">tys</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>   </span><span class="hs-comment">-- Also common</span><span>
</span><span id="line-1503"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(Type, Type)] -&gt; Bool
</span><a href="GHC.Core.Unify.html#typesCantMatch"><span class="hs-identifier hs-var">typesCantMatch</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Type -&gt; [(Type, Type)]) -&gt; [Type] -&gt; [(Type, Type)]
forall (t :: * -&gt; *) a b. Foldable t =&gt; (a -&gt; [b]) -&gt; t a -&gt; [b]
</span><a href="../../base/src/Data.Foldable.html#concatMap"><span class="hs-identifier hs-var">concatMap</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; [(Type, Type)]
</span><a href="#local-6989586621680822420"><span class="hs-identifier hs-var">predEqs</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822424"><span class="hs-identifier hs-var">inst_theta</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1504"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1505"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[TyVar]
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680822424"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822424"><span class="hs-identifier hs-var">inst_theta</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Type]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; [Type] -&gt; ([TyVar], [Type], [Type])
</span><a href="GHC.Core.DataCon.html#dataConInstSig"><span class="hs-identifier hs-var">dataConInstSig</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822426"><span class="hs-identifier hs-var">con</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822427"><span class="hs-identifier hs-var">tys</span></a></span><span>
</span><span id="line-1506"></span><span>
</span><span id="line-1507"></span><span>    </span><span class="hs-comment">-- TODO: could gather equalities from superclasses too</span><span>
</span><span id="line-1508"></span><span>    </span><span id="local-6989586621680822420"><span class="annot"><span class="annottext">predEqs :: Type -&gt; [(Type, Type)]
</span><a href="#local-6989586621680822420"><span class="hs-identifier hs-var hs-var">predEqs</span></a></span></span><span> </span><span id="local-6989586621680822416"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822416"><span class="hs-identifier hs-var">pred</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Type -&gt; Pred
</span><a href="GHC.Core.Predicate.html#classifyPredType"><span class="hs-identifier hs-var">classifyPredType</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822416"><span class="hs-identifier hs-var">pred</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1509"></span><span>                     </span><span class="annot"><a href="GHC.Core.Predicate.html#EqPred"><span class="hs-identifier hs-type">EqPred</span></a></span><span> </span><span class="annot"><span class="annottext">EqRel
</span><a href="GHC.Core.Predicate.html#NomEq"><span class="hs-identifier hs-var">NomEq</span></a></span><span> </span><span id="local-6989586621680822412"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822412"><span class="hs-identifier hs-var">ty1</span></a></span></span><span> </span><span id="local-6989586621680822411"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822411"><span class="hs-identifier hs-var">ty2</span></a></span></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822412"><span class="hs-identifier hs-var">ty1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822411"><span class="hs-identifier hs-var">ty2</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-1510"></span><span>                     </span><span class="annot"><a href="GHC.Core.Predicate.html#ClassPred"><span class="hs-identifier hs-type">ClassPred</span></a></span><span> </span><span id="local-6989586621680822409"><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680822409"><span class="hs-identifier hs-var">eq</span></a></span></span><span> </span><span id="local-6989586621680822408"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822408"><span class="hs-identifier hs-var">args</span></a></span></span><span>
</span><span id="line-1511"></span><span>                       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680822409"><span class="hs-identifier hs-var">eq</span></a></span><span> </span><span class="annot"><span class="annottext">Class -&gt; Unique -&gt; Bool
forall a. Uniquable a =&gt; a -&gt; Unique -&gt; Bool
</span><a href="GHC.Types.Unique.html#hasKey"><span class="hs-operator hs-var">`hasKey`</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#eqTyConKey"><span class="hs-identifier hs-var">eqTyConKey</span></a></span><span>
</span><span id="line-1512"></span><span>                       </span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680822407"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822407"><span class="hs-identifier hs-var">ty1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680822406"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822406"><span class="hs-identifier hs-var">ty2</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822408"><span class="hs-identifier hs-var">args</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822407"><span class="hs-identifier hs-var">ty1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822406"><span class="hs-identifier hs-var">ty2</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-1513"></span><span>                       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680822409"><span class="hs-identifier hs-var">eq</span></a></span><span> </span><span class="annot"><span class="annottext">Class -&gt; Unique -&gt; Bool
forall a. Uniquable a =&gt; a -&gt; Unique -&gt; Bool
</span><a href="GHC.Types.Unique.html#hasKey"><span class="hs-operator hs-var">`hasKey`</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#heqTyConKey"><span class="hs-identifier hs-var">heqTyConKey</span></a></span><span>
</span><span id="line-1514"></span><span>                       </span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680822405"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822405"><span class="hs-identifier hs-var">ty1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680822404"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822404"><span class="hs-identifier hs-var">ty2</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822408"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822405"><span class="hs-identifier hs-var">ty1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822404"><span class="hs-identifier hs-var">ty2</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-1515"></span><span>                     </span><span class="annot"><span class="annottext">Pred
</span><span class="hs-identifier">_</span></span><span>                            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-1516"></span><span>
</span><span id="line-1517"></span><span class="hs-comment">-- | Were the type variables of the data con written in a different order</span><span>
</span><span id="line-1518"></span><span class="hs-comment">-- than the regular order (universal tyvars followed by existential tyvars)?</span><span>
</span><span id="line-1519"></span><span class="hs-comment">--</span><span>
</span><span id="line-1520"></span><span class="hs-comment">-- This is not a cheap test, so we minimize its use in GHC as much as possible.</span><span>
</span><span id="line-1521"></span><span class="hs-comment">-- Currently, its only call site in the GHC codebase is in 'mkDataConRep' in</span><span>
</span><span id="line-1522"></span><span class="hs-comment">-- &quot;MkId&quot;, and so 'dataConUserTyVarsArePermuted' is only called at most once</span><span>
</span><span id="line-1523"></span><span class="hs-comment">-- during a data constructor's lifetime.</span><span>
</span><span id="line-1524"></span><span>
</span><span id="line-1525"></span><span class="hs-comment">-- See Note [DataCon user type variable binders], as well as</span><span>
</span><span id="line-1526"></span><span class="hs-comment">-- Note [Data con wrappers and GADT syntax] for an explanation of what</span><span>
</span><span id="line-1527"></span><span class="hs-comment">-- mkDataConRep is doing with this function.</span><span>
</span><span id="line-1528"></span><span class="annot"><a href="GHC.Core.DataCon.html#dataConUserTyVarsArePermuted"><span class="hs-identifier hs-type">dataConUserTyVarsArePermuted</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-1529"></span><span id="dataConUserTyVarsArePermuted"><span class="annot"><span class="annottext">dataConUserTyVarsArePermuted :: DataCon -&gt; Bool
</span><a href="GHC.Core.DataCon.html#dataConUserTyVarsArePermuted"><span class="hs-identifier hs-var hs-var">dataConUserTyVarsArePermuted</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#MkData"><span class="hs-identifier hs-type">MkData</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dcUnivTyVars :: DataCon -&gt; [TyVar]
</span><a href="GHC.Core.DataCon.html#dcUnivTyVars"><span class="hs-identifier hs-var">dcUnivTyVars</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822403"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822403"><span class="hs-identifier hs-var">univ_tvs</span></a></span></span><span>
</span><span id="line-1530"></span><span>                                     </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dcExTyCoVars :: DataCon -&gt; [TyVar]
</span><a href="GHC.Core.DataCon.html#dcExTyCoVars"><span class="hs-identifier hs-var">dcExTyCoVars</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822402"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822402"><span class="hs-identifier hs-var">ex_tvs</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dcEqSpec :: DataCon -&gt; [EqSpec]
</span><a href="GHC.Core.DataCon.html#dcEqSpec"><span class="hs-identifier hs-var">dcEqSpec</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822401"><span class="annot"><span class="annottext">[EqSpec]
</span><a href="#local-6989586621680822401"><span class="hs-identifier hs-var">eq_spec</span></a></span></span><span>
</span><span id="line-1531"></span><span>                                     </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dcUserTyVarBinders :: DataCon -&gt; [InvisTVBinder]
</span><a href="GHC.Core.DataCon.html#dcUserTyVarBinders"><span class="hs-identifier hs-var">dcUserTyVarBinders</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822400"><span class="annot"><span class="annottext">[InvisTVBinder]
</span><a href="#local-6989586621680822400"><span class="hs-identifier hs-var">user_tvbs</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1532"></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[EqSpec] -&gt; [TyVar] -&gt; [TyVar]
</span><a href="GHC.Core.DataCon.html#filterEqSpec"><span class="hs-identifier hs-var">filterEqSpec</span></a></span><span> </span><span class="annot"><span class="annottext">[EqSpec]
</span><a href="#local-6989586621680822401"><span class="hs-identifier hs-var">eq_spec</span></a></span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822403"><span class="hs-identifier hs-var">univ_tvs</span></a></span><span> </span><span class="annot"><span class="annottext">[TyVar] -&gt; [TyVar] -&gt; [TyVar]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680822402"><span class="hs-identifier hs-var">ex_tvs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[TyVar] -&gt; [TyVar] -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">[InvisTVBinder] -&gt; [TyVar]
forall tv argf. [VarBndr tv argf] -&gt; [tv]
</span><a href="GHC.Types.Var.html#binderVars"><span class="hs-identifier hs-var">binderVars</span></a></span><span> </span><span class="annot"><span class="annottext">[InvisTVBinder]
</span><a href="#local-6989586621680822400"><span class="hs-identifier hs-var">user_tvbs</span></a></span><span>
</span><span id="line-1533"></span><span>
</span><span id="line-1534"></span><span class="hs-comment">{-
%************************************************************************
%*                                                                      *
        Promoting of data types to the kind level
*                                                                      *
************************************************************************

-}</span><span>
</span><span id="line-1542"></span><span>
</span><span id="line-1543"></span><span class="annot"><a href="GHC.Core.DataCon.html#promoteDataCon"><span class="hs-identifier hs-type">promoteDataCon</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html#TyCon"><span class="hs-identifier hs-type">TyCon</span></a></span><span>
</span><span id="line-1544"></span><span id="promoteDataCon"><span class="annot"><span class="annottext">promoteDataCon :: DataCon -&gt; TyCon
</span><a href="GHC.Core.DataCon.html#promoteDataCon"><span class="hs-identifier hs-var hs-var">promoteDataCon</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#MkData"><span class="hs-identifier hs-type">MkData</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dcPromoted :: DataCon -&gt; TyCon
</span><a href="GHC.Core.DataCon.html#dcPromoted"><span class="hs-identifier hs-var">dcPromoted</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680822399"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680822399"><span class="hs-identifier hs-var">tc</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680822399"><span class="hs-identifier hs-var">tc</span></a></span><span>
</span><span id="line-1545"></span><span>
</span><span id="line-1546"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection{Splitting products}
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-1553"></span><span>
</span><span id="line-1554"></span><span class="hs-comment">-- | Extract the type constructor, type argument, data constructor and it's</span><span>
</span><span id="line-1555"></span><span class="hs-comment">-- /representation/ argument types from a type if it is a product type.</span><span>
</span><span id="line-1556"></span><span class="hs-comment">--</span><span>
</span><span id="line-1557"></span><span class="hs-comment">-- Precisely, we return @Just@ for any type that is all of:</span><span>
</span><span id="line-1558"></span><span class="hs-comment">--</span><span>
</span><span id="line-1559"></span><span class="hs-comment">--  * Concrete (i.e. constructors visible)</span><span>
</span><span id="line-1560"></span><span class="hs-comment">--</span><span>
</span><span id="line-1561"></span><span class="hs-comment">--  * Single-constructor</span><span>
</span><span id="line-1562"></span><span class="hs-comment">--</span><span>
</span><span id="line-1563"></span><span class="hs-comment">--  * Not existentially quantified</span><span>
</span><span id="line-1564"></span><span class="hs-comment">--</span><span>
</span><span id="line-1565"></span><span class="hs-comment">-- Whether the type is a @data@ type or a @newtype@</span><span>
</span><span id="line-1566"></span><span class="annot"><a href="GHC.Core.DataCon.html#splitDataProductType_maybe"><span class="hs-identifier hs-type">splitDataProductType_maybe</span></a></span><span>
</span><span id="line-1567"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span>                         </span><span class="hs-comment">-- ^ A product type, perhaps</span><span>
</span><span id="line-1568"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCon.html#TyCon"><span class="hs-identifier hs-type">TyCon</span></a></span><span class="hs-special">,</span><span>                </span><span class="hs-comment">-- The type constructor</span><span>
</span><span id="line-1569"></span><span>                  </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>               </span><span class="hs-comment">-- Type args of the tycon</span><span>
</span><span id="line-1570"></span><span>                  </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span class="hs-special">,</span><span>              </span><span class="hs-comment">-- The data constructor</span><span>
</span><span id="line-1571"></span><span>                  </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Scaled"><span class="hs-identifier hs-type">Scaled</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>        </span><span class="hs-comment">-- Its /representation/ arg types</span><span>
</span><span id="line-1572"></span><span>
</span><span id="line-1573"></span><span>        </span><span class="hs-comment">-- Rejecting existentials is conservative.  Maybe some things</span><span>
</span><span id="line-1574"></span><span>        </span><span class="hs-comment">-- could be made to work with them, but I'm not going to sweat</span><span>
</span><span id="line-1575"></span><span>        </span><span class="hs-comment">-- it through till someone finds it's important.</span><span>
</span><span id="line-1576"></span><span>
</span><span id="line-1577"></span><span id="splitDataProductType_maybe"><span class="annot"><span class="annottext">splitDataProductType_maybe :: Type -&gt; Maybe (TyCon, [Type], DataCon, [Scaled Type])
</span><a href="GHC.Core.DataCon.html#splitDataProductType_maybe"><span class="hs-identifier hs-var hs-var">splitDataProductType_maybe</span></a></span></span><span> </span><span id="local-6989586621680822398"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822398"><span class="hs-identifier hs-var">ty</span></a></span></span><span>
</span><span id="line-1578"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680822397"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680822397"><span class="hs-identifier hs-var">tycon</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680822396"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822396"><span class="hs-identifier hs-var">ty_args</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Type -&gt; Maybe (TyCon, [Type])
Type -&gt; Maybe (TyCon, [Type])
</span><a href="GHC.Core.Type.html#splitTyConApp_maybe"><span class="hs-identifier hs-var">splitTyConApp_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680822398"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-1579"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680822395"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822395"><span class="hs-identifier hs-var">con</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Maybe DataCon
</span><a href="GHC.Core.TyCon.html#isDataProductTyCon_maybe"><span class="hs-identifier hs-var">isDataProductTyCon_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680822397"><span class="hs-identifier hs-var">tycon</span></a></span><span>
</span><span id="line-1580"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(TyCon, [Type], DataCon, [Scaled Type])
-&gt; Maybe (TyCon, [Type], DataCon, [Scaled Type])
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680822397"><span class="hs-identifier hs-var">tycon</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822396"><span class="hs-identifier hs-var">ty_args</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822395"><span class="hs-identifier hs-var">con</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; [Type] -&gt; [Scaled Type]
</span><a href="GHC.Core.DataCon.html#dataConInstArgTys"><span class="hs-identifier hs-var">dataConInstArgTys</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680822395"><span class="hs-identifier hs-var">con</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680822396"><span class="hs-identifier hs-var">ty_args</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1581"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-1582"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (TyCon, [Type], DataCon, [Scaled Type])
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-1583"></span></pre></body></html>